import React from 'react'; import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { View, Text, StyleSheet, ActivityIndicator } from 'react-native'; import { Ionicons } from '@expo/vector-icons'; import { useAuth } from '../context/AuthContext'; import { colors, borderRadius } from '../theme'; import { LoginScreen } from '../screens/auth/LoginScreen'; import { HomeScreen } from '../screens/home/HomeScreen'; import { CaptureScreen } from '../screens/capture/CaptureScreen'; import { ProcessingScreen } from '../screens/capture/ProcessingScreen'; import { MyIssuesScreen } from '../screens/issues/MyIssuesScreen'; import { IssueDetailScreen } from '../screens/issues/IssueDetailScreen'; import { ProfileScreen } from '../screens/profile/ProfileScreen'; const Stack = createNativeStackNavigator(); const Tab = createBottomTabNavigator(); function MainTabs() { return ( ( ), }} /> ( ), }} /> ( ), }} /> ); } function AuthStack() { return ( ); } function AppStack() { return ( ); } export function AppNavigator() { const { user, loading } = useAuth(); if (loading) { return ( Loading... ); } return ( {user ? : } ); } const styles = StyleSheet.create({ loadingContainer: { flex: 1, backgroundColor: colors.background.primary, justifyContent: 'center', alignItems: 'center', }, spinner: { marginTop: 24, }, loadingText: { color: colors.text.secondary, fontSize: 16, marginTop: 16, }, tabBar: { backgroundColor: colors.background.secondary, borderTopWidth: 1, borderTopColor: colors.border.light, height: 80, paddingTop: 8, paddingBottom: 20, }, tabBarLabel: { fontSize: 12, fontWeight: '500', marginTop: 4, }, });