import React from 'react';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { NavigationContainer } from '@react-navigation/native';
import { Splash } from '../lotties/Splash';
import Login from '../screens/Login';
import AuthRoutes from './tab.routes';
import Pessoas from '../screens/Pessoas';
import NovaPessoa from '../screens/NovaPessoa';
import Fornecedores from '../screens/Fornecedores';
import NovoFornecedor from '../screens/NovoFornecedor';
import Tarefas from '../screens/Tarefas';
import NovaTarefa from '../screens/NovaTarefa';
import Funcionarios from '../screens/Funcionarios';
import NovoFuncionario from '../screens/NovoFuncionario';

const Stack = createNativeStackNavigator();

function StackNavigator(){
    return (
        <Stack.Navigator screenOptions={{headerShown: false}}>
            <Stack.Screen name="Login" component={Login} />
            <Stack.Screen name="Home" component={AuthRoutes} />
            <Stack.Screen name="Pessoas" component={Pessoas} />
            <Stack.Screen name="NovaPessoa" component={NovaPessoa} />
             <Stack.Screen name="Fornecedores" component={Fornecedores} />
            <Stack.Screen name="NovoFornecedor" component={NovoFornecedor} />
            <Stack.Screen name="Tarefas" component={Tarefas} />
            <Stack.Screen name="NovaTarefa" component={NovaTarefa} />
            <Stack.Screen name="Funcionarios" component={Funcionarios} />
            <Stack.Screen name="NovoFuncionario" component={NovoFuncionario} />
            <Stack.Screen name="Splash" component={Splash} />
        </Stack.Navigator>
    )
}

function AppRoutes(){
    return(
        <NavigationContainer>
            <StackNavigator />
        </NavigationContainer>
    )
}
export default AppRoutes;