import { createStackNavigator } from "@react-navigation/stack";
import { NavigationContainer } from "@react-navigation/native";
import Home from "../screens/AksesWarga/Home";
// import AksesAkun from "../screens/AksesAkun";
import masuk from "../screens/masuk";
// import bottomtab from "./BottomTab";
import LokasiTerdekat from "../screens/AksesWarga/LokasiTerdekat";
import daftarTPS from "../screens/daftarTPS";
import RiwayatCoinScreen from "../screens/AksesWarga/RiwayatCoinScreen";
import pengaduansampah from "../screens/PengaduanWarga/pengaduansampah";
import PengaduanSampahScreenAdmin from "../screens/AksesAdmin/PengaduanSampahScreenAdmin";
import misimingguan from "../screens/AksesWarga/misimingguan";
import BerandaPengaduan from "../screens/AksesWarga/BerandaPengaduan";
import KontribusiScreen from "../screens/PengaduanWarga/KontribusiScreen";
import EcoMapCoinExchangeScreen from "../screens/AksesWarga/EcoMapCoinExchangeScreen";
import NotifikasiScreen from "../screens/AksesAdmin/NotifikasiAdminScreen";
import ProfilScreen from "../screens/AksesWarga/ProfilScreen";
import DetailPengaduan from "../screens/PengaduanWarga/DetailPengaduan";
import StatusPengirimanScreen from "../screens/ProfilWarga/StatusPengiriman/StatusPengirimanScreen";
import Donasi from "../screens/ProfilWarga/DonasiWarga/Donasi";
import InformasiPribadi from "../screens/ProfilWarga/InformasiPribadi/InformasiPribadi";
import EditInformasiPribadi from "../screens/ProfilWarga/InformasiPribadi/EditInformasiPribadi";
import DetailPengiriman from "../screens/ProfilWarga/StatusPengiriman/DetailPengiriman";
import Donasiberhasil from "../screens/ProfilWarga/DonasiWarga/Donasiberhasil";
import StatusPengaduan from "../screens/ProfilWarga/StatusPengaduan/StatusPengaduan";
// import Donasi from "../screens/ProfilWarga/DonasiWarga/Donasi";
import MetodeDonasi from "../screens/ProfilWarga/DonasiWarga/MetodeDonasi";
import KonfirmasiPembayaran from "../screens/ProfilWarga/DonasiWarga/KonfirmasiPembayaran";
import DonasiVerifikasi from "../screens/ProfilWarga/DonasiWarga/DonasiVerifikasi";

// import LokasiTerdekat from "../screens/AksesWarga/LokasiTerdekat";
// import daftarTPS from "../screens/daftarTPS";
// import RiwayatCoinScreen from "../screens/AksesWarga/RiwayatCoinScreen";
const Stack = createStackNavigator();
const ProfilNavigator = createStackNavigator();

function StatusPengaduanStack() {
  return (
    <ProfilNavigator.Navigator>
      <ProfilNavigator.Screen
        name="StatusPengaduan"
        component={StatusPengaduan}
        options={{ headerShown: false }}
      />
    </ProfilNavigator.Navigator>
  );
}
function InformasiPribadiStackScreen() {
  return (
    <Stack.Navigator>
      <Stack.Screen
        name="InformasiPribadi"
        component={InformasiPribadi}
        options={{ headerShown: false }}
      />
      <Stack.Screen
        name="EditInformasiPribadi"
        component={EditInformasiPribadi}
        options={{ headerShown: false }}
      />
    </Stack.Navigator>
  );
}
function StatusPenukaranKoinStackScreen() {
  return (
    <Stack.Navigator>
      <Stack.Screen
        name="StatusPengirimanScreen"
        component={StatusPengirimanScreen}
        options={{ headerShown: false }}
      />
      <Stack.Screen
        name="DetailPengiriman"
        component={DetailPengiriman}
        options={{ headerShown: false }}
      />
    </Stack.Navigator>
  );
}
function DonasiStackScreen() {
  return (
    <Stack.Navigator screenOptions={{ headerShown: false }}>
      <Stack.Screen name="Donasi" component={Donasi} />
      <Stack.Screen name="MetodeDonasi" component={MetodeDonasi} />
      <Stack.Screen
        name="KonfirmasiPembayaran"
        component={KonfirmasiPembayaran}
      />
      <Stack.Screen name="DonasiVerifikasi" component={DonasiVerifikasi} />
      <Stack.Screen name="Donasiberhasil" component={Donasiberhasil} />
      <Stack.Screen name="Home" component={Home} />
    </Stack.Navigator>
  );
}

// Navigator utama untuk Akses Warga
export default function ProfilNavigation() {
  return (
    <Stack.Navigator>
      {/* <Stack.Screen
        name="Home"
        component={Home}
        options={{ headerShown: false }}
      /> */}
      <Stack.Screen
        name="ProfilScreen"
        component={ProfilScreen}
        options={{ headerShown: false }}
      />
      {/* Di sini kita bisa menambahkan PengaduanWargaStack sebagai nested navigator */}
      <Stack.Screen
        name="InformasiPribadiStackScreen"
        component={InformasiPribadiStackScreen}
        options={{ headerShown: false }}
      />
      <Stack.Screen
        name="StatusPenukaranKoinStackScreen"
        component={StatusPenukaranKoinStackScreen}
        options={{ headerShown: false }}
      />
      <Stack.Screen
        name="DonasiStackScreen"
        component={DonasiStackScreen}
        options={{ headerShown: false }}
      />
      <Stack.Screen
        name="StatusPengaduanStack"
        component={StatusPengaduanStack}
        options={{ headerShown: false }}
      />
    </Stack.Navigator>
  );
}
