import { createStackNavigator } from "@react-navigation/stack";
import Home from "../screens/AksesWarga/Home";
import pengaduansampah from "../screens/PengaduanWarga/pengaduansampah";
import masuk from "../screens/masuk";
import LoadingScreen from "../screens/PengaduanWarga/LoadingScreen";
import PengaduanBerhasil from "../screens/PengaduanWarga/PengaduanBerhasil";
import BerandaPengaduan from "../screens/AksesWarga/BerandaPengaduan";

const Stack = createStackNavigator();

// Navigator untuk Pengaduan Warga
function PengaduanWargaStackScreen() {
  return (
    <Stack.Navigator>
      <Stack.Screen
        name="pengaduansampah"
        component={pengaduansampah}
        options={{ headerShown: false }}
      />
      {/* <Stack.Screen
        name="LoadingScreen"
        component={LoadingScreen}
        options={{ headerShown: false }}
      /> */}
      <Stack.Screen
        name="PengaduanBerhasil"
        component={PengaduanBerhasil}
        options={{ headerShown: false }}
      />
      <Stack.Screen
        name="BerandaPengaduan"
        component={BerandaPengaduan}
        options={{ headerShown: false }}
      />
    </Stack.Navigator>
  );
}

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