import { ModalsManagerProvider } from "@/contexts/ModalsManagerContext";
import { UserAuthenticationContextProvider } from "@/contexts/UserAuthenticationContext";
import AppMainStackNavigator from "@/navigations/AppMainStackNavigator";
import theme from "@/themes/Theme";
import ProvideQueryClient from "@components/providers_wrappers/ProvideQueryClient";
import { LOG } from "@logger";
import { NavigationContainer } from "@react-navigation/native";
import { ThemeProvider } from "@shopify/restyle";
import ModalContainer from "react-modal-promise";
import { SafeAreaProvider } from "react-native-safe-area-context";

const log = LOG.extend("App");

export default function App() {
	log.verbose("App started...");
	return (
		<ThemeProvider theme={theme}>
			<ModalsManagerProvider>
				<SafeAreaProvider>
					<NavigationContainer>
						<ProvideQueryClient>
							<UserAuthenticationContextProvider>
								{/* <View style={styles.container}> */}
								{/* <SafeAreaProvider>
					<StatusBar style="auto" />
					<UserLoginScreen />
				</SafeAreaProvider> */}
								<AppMainStackNavigator />
								{/* </View> */}
							</UserAuthenticationContextProvider>
						</ProvideQueryClient>
					</NavigationContainer>
				</SafeAreaProvider>
			</ModalsManagerProvider>
			<ModalContainer />
		</ThemeProvider>
	);
}
