import '../global.css';
import { AuthProvider } from '@/utils/authContext';
import { Stack } from 'expo-router';
import { AlertProvider } from '@/components/AlertComponent';
import { NetworkProvider } from '@/utils/networkProvider';
import { SafeAreaProvider } from 'react-native-safe-area-context';

export default function AppLayout() {
    return (
        <SafeAreaProvider>
            <NetworkProvider>
                <AuthProvider>
                    <AlertProvider>
                        <Stack screenOptions={{ headerShown: false }}>
                            <Stack.Screen name="(protected)" />
                            <Stack.Screen name="login" />
                        </Stack>
                    </AlertProvider>
                </AuthProvider>
            </NetworkProvider>
        </SafeAreaProvider>
    );
}