import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import Splash from '../screens/AuthScreen/Splash';
import Login from '../screens/AuthScreen/Login';
import VerifyOTP from '../screens/AuthScreen/VerifyOTP';
import { ToastComponent } from '../constants/Toast';
import StoreInfo from '../screens/MainScreen/StoreInfo';

import Feedback from '../screens/MainScreen/Feedback';
import Dashboard from '../screens/MainScreen/Dashboard';
import FeedbackCategories from '../screens/MainScreen/Feedback/FeedbackCategories';
import { Platform, StatusBar, View } from 'react-native';
import Welcome from '../screens/MainScreen/WelcomePage';

const Stack = createNativeStackNavigator();

const Routes = () => {
  const STATUSBAR_HEIGHT = Platform.OS === 'ios' ? 50 : StatusBar.currentHeight;
  return (
    <NavigationContainer>
      {Platform.OS === 'ios' && (
        <View style={{
          height: STATUSBAR_HEIGHT,
          bbarStyle:'light-content',
          backgroundColor: '#113F8C',
        }} />
      )}
      <StatusBar barStyle={'light-content'} backgroundColor={'#113F8C'} />
      <Stack.Navigator
        screenOptions={{ headerShown: false }}
        initialRouteName="Splash">
        <Stack.Screen name="Splash" component={Splash} />
        <Stack.Screen name="Login" component={Login} />
        <Stack.Screen name="VerifyOTP" component={VerifyOTP} />
        <Stack.Screen name="Welcome" component={Welcome} />
        <Stack.Screen name="StoreInfo" component={StoreInfo} />
        <Stack.Screen name="Dashboard" component={Dashboard} />
        <Stack.Screen name="Feedback" component={Feedback} />
        <Stack.Screen name="FeedbackCategories" component={FeedbackCategories} />
      </Stack.Navigator>
       <ToastComponent />
    </NavigationContainer>
  );
};

export default Routes;