// import React, { useState } from "react"; // import { // View, // Text, // TextInput, // TouchableOpacity, // StyleSheet, // ScrollView, // StatusBar, // Image, // } from "react-native"; // import { Ionicons, FontAwesome } from "@expo/vector-icons"; // import { useNavigation } from "@react-navigation/native"; // const Masuk = () => { // const navigation = useNavigation(); // const [role, setRole] = useState(null); // null, "warga", atau "admin" // const [email, setEmail] = useState(""); // const [password, setPassword] = useState(""); // const [showPassword, setShowPassword] = useState(false); // // Fungsi handle login sesuai role // const handleLogin = () => { // if (role === "warga") { // navigation.navigate("AksesWargaNavigator", { screen: "Home" }); // } else if (role === "admin") { // navigation.navigate("AdminHome"); // } // }; // return ( // // // // navigation.navigate("AksesAkun")} // style={{ width: 45, height: 45, marginBottom: 10 }} // > // // // // // // Selamat Datang Ecomapper! // // // {/* Form login muncul kalau role sudah dipilih */} // {role && ( // // // Masuk sebagai {role} // // Email // // // // // Kata Sandi // // // // setShowPassword(!showPassword)} // style={styles.eyeIcon} // > // // // // // Masuk // // {/* Tombol kembali untuk pilih ulang role */} // setRole(null)} // style={{ marginTop: 15, alignItems: "center" }} // > // // Pilih ulang peran // // // // )} // // // ); // }; // const styles = StyleSheet.create({ // formContainer: { // marginTop: 20, // }, // label: { // fontSize: 18, // marginBottom: 10, // color: "#333", // }, // inputContainer: { // flexDirection: "row", // alignItems: "center", // borderColor: "#ddd", // borderWidth: 1, // borderRadius: 5, // marginBottom: 20, // }, // input: { // flex: 1, // height: 45, // paddingLeft: 10, // }, // icon: { // paddingLeft: 10, // }, // passwordContainer: { // flexDirection: "row", // alignItems: "center", // borderColor: "#ddd", // height: 45, // borderWidth: 1, // borderRadius: 5, // marginBottom: 20, // }, // passwordInput: { // flex: 1, // height: 45, // paddingLeft: 10, // }, // eyeIcon: { // paddingRight: 10, // }, // button: { // backgroundColor: "#2D572C", // paddingVertical: 15, // borderRadius: 5, // marginTop: 10, // }, // buttonText: { // textAlign: "center", // color: "#fff", // fontSize: 16, // fontWeight: "bold", // }, // }); // export default Masuk;