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 Usuarios from '../screens/Usuarios';
import NovoUsuario from '../screens/NovoUsuario';
import Funcionarios from '../screens/Funcionarios';
import Vendedores from '../screens/Vendedores';
import Compradores from '../screens/Compradores';
import Locatarios from '../screens/Locatarios';
import Imoveis from '../screens/Imoveis';
import Tarefas from '../screens/Tarefas';
import NovaTarefa from '../screens/NovaTarefa';
import Agenda from '../screens/Agenda';

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="Usuarios" component={Usuarios} />
            <Stack.Screen name="NovoUsuario" component={NovoUsuario} />
            <Stack.Screen name="Funcionarios" component={Funcionarios} />
            <Stack.Screen name="Vendedores" component={Vendedores} />
            <Stack.Screen name="Compradores" component={Compradores} />
            <Stack.Screen name="Locatarios" component={Locatarios} />
            <Stack.Screen name="Imoveis" component={Imoveis} />
            <Stack.Screen name="Tarefas" component={Tarefas} />
            <Stack.Screen name="NovaTarefa" component={NovaTarefa} />
            <Stack.Screen name="Agenda" component={Agenda} />
            
            <Stack.Screen name="Splash" component={Splash} />
        </Stack.Navigator>
    )
}


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