/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow strict-local
 */

import React from 'react';
import { StyleSheet, ScrollView, View, Text, StatusBar } from 'react-native';
import { SafeAreaProvider } from 'react-native-safe-area-context';

import Router from './router';
import { Provider } from 'mobx-react';

import Store from './src/stores/index';
import { NavigationContainer, useFocusEffect } from '@react-navigation/native';
import { createStackNavigator, HeaderBackButton } from '@react-navigation/stack';
import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import {
  Header,
  LearnMoreLinks,
  Colors,
  DebugInstructions,
  ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';

console.disableYellowBox = true;



const App: () => React$Node = () => {
  return (
    <>
      <Provider {...Store}>
        <SafeAreaProvider>
          <StatusBar
            animated={true}
            barStyle={'default'}
            backgroundColor={'white'}
            translucent={true}
          />
          <NavigationContainer
            onStateChange={state => Store.appStore.setRouterState(state)}
            ref={navigatorRef => Store.appStore.setRouterRef(navigatorRef)}>
            <Router />
          </NavigationContainer>
        </SafeAreaProvider>
      </Provider>
    </>
  );
};


export default App;
