import React from 'react';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { OnBoardingParamList } from '@navigation/navigationTypes';
import {
  SetLocationScreen,
  CompleteProfileScreen,
  OnboardingCompleteScreen,
  KycScreen,
} from '@features/screens';
import { RouteNames } from '@utils/constants';
import { useAppSelector } from '@store';

const Stack = createNativeStackNavigator<OnBoardingParamList>();

const onBoardingStack: React.FC = () => {
  const { alreadyNavigate } = useAppSelector(state => state.onboard);
  return (
    <Stack.Navigator screenOptions={{ headerShown: false }}>
      {/* <Stack.Screen
        name={RouteNames.SetLocation}
        component={SetLocationScreen}
      /> */}
      {!alreadyNavigate && (
        <Stack.Screen
          name={RouteNames.CompleteProfile}
          component={CompleteProfileScreen}
        />
      )}
      <Stack.Screen name={RouteNames.Kyc} component={KycScreen} />
      <Stack.Screen
        name={RouteNames.OnboardingComplete}
        component={OnboardingCompleteScreen}
      />
    </Stack.Navigator>
  );
};

export default onBoardingStack;
