import React from "react";
import { SafeAreaView } from 'react-native-safe-area-context';
import { StatusBar } from "react-native";

import { ScrollView } from "react-native";
import AuthProvider from "@components/AuthProvider";
import * as SplashScreen from 'expo-splash-screen';
import { Slot, Stack } from "expo-router";

SplashScreen.preventAutoHideAsync();

export const unstable_settings = {
  initialRouteName: 'auth/login',
}

function App() {
  const backgroundStyle = {
    backgroundColor: "#333333",
    fontFamily: "Pretendard-Regular",
    color: "white",
  };
  SplashScreen.hideAsync();
  return (
    <SafeAreaView style={{ ...backgroundStyle, height: "100%", flex:1 }}>
      <AuthProvider>
          <StatusBar
            barStyle={"light-content"}
            backgroundColor={backgroundStyle.backgroundColor}
          />
          <ScrollView
            style={{
              paddingHorizontal: 16,
              height: "auto",
              backgroundColor: "#333333",
            }}
          >
            <Slot />
          </ScrollView>
      </AuthProvider>
    </SafeAreaView>
  );
}

export default App;
