import { Stack } from 'expo-router/stack';
import AuthProvider from '../context/AuthProvider';
import { EXPO_PUBLIC_NODE_ENV } from '@env';

export default function RootLayout() {
    return (
        <AuthProvider>
            <Stack>
                <Stack.Screen
                    name="(auth)/(tabs)"
                    options={{ headerShown: false }}
                />
                <Stack.Screen
                    name="(public)/login"
                    options={{ headerShown: false, title: 'Login' }}
                />
                {/* Testing Purpose */}
                {EXPO_PUBLIC_NODE_ENV == 'development' ? (
                    <Stack.Screen
                        name="(public)/test"
                        options={{
                            headerShown: true,
                            title: 'Test Component Page'
                        }}
                    />
                ) : (
                    <></>
                )}
            </Stack>
        </AuthProvider>
    );
}
