import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { NavigationContainer } from "@react-navigation/native";
import HomeNavigator from "./HomeNavigator"; // Import HomeNavigator
import ProfilScreenNavigator from "./ProfilScreenNavigator"; // Import ProfileNavigator
import NotifikasiScreen from "./screens/AksesWarga/NotifikasiScreen";
import EcoMapCoinExchangeScreen from "./screens/AksesWarga/EcoMapCoinExchangeScreen";

const Tab = createBottomTabNavigator();

function App() {
  return (
    <NavigationContainer>
      <Tab.Navigator initialRouteName="Home">
        {/* Tab Home yang akan menggunakan HomeNavigator */}
        <Tab.Screen
          name="HomeNavigator"
          component={HomeNavigator} // Gunakan HomeNavigator di sini
          options={{ headerShown: false }}
        />

        {/* Tab Profile yang menggunakan ProfileNavigator */}
        <Tab.Screen
          name="ProfilNavigator"
          component={ProfilScreenNavigator}
          options={{ headerShown: false }}
        />

        {/* Tab Notifikasi */}
        <Tab.Screen
          name="Notifikasi"
          component={NotifikasiScreen}
          options={{ headerShown: false }}
        />

        {/* Tab EcoMap Coin Exchange */}
        <Tab.Screen
          name="EcoMapCoinExchange"
          component={EcoMapCoinExchangeScreen}
          options={{ headerShown: false }}
        />
      </Tab.Navigator>
    </NavigationContainer>
  );
}

export default App;
