import React, { useEffect } from 'react';
import { StatusBar } from 'react-native';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { useAuth } from '@/store/auth';
import RootNavigation from '@/navigation';
import { Colors } from '@/theme/colors';

export default function App() {
  const { boot } = useAuth();

  useEffect(() => {
    boot();
  }, []);

  return (
    <GestureHandlerRootView style={{ flex: 1 }}>
      <SafeAreaProvider>
        <StatusBar barStyle="dark-content" backgroundColor={Colors.bg} />
        <RootNavigation />
      </SafeAreaProvider>
    </GestureHandlerRootView>
  );
}
