import React, {Fragment, useEffect} from 'react';
import {
  
  StyleSheet,
  ScrollView,
  View,
  Text,
  StatusBar,
} from 'react-native';

import KeepAwake from 'react-native-keep-awake';

// //페이지 import 
// import LoginPage from './src/pages/_1_Login';
// import AcceptTerms from './src/pages/_2_AcceptTerms';
// import Guide1 from './src/pages/_3_Guide1';
// import Guide2 from './src/pages/_4_Guide2';
// import Main from './src/pages/_5_Main';

// //팝업 임포트 
// import TermsPopup from './src/opup/_1_TermsPopup';

//다국어 
import i18n from  "i18n-js";
import KO from "./src/i18n/ko"
i18n.translations["ko"] = KO;
i18n.locale = "ko"; 

//모듈 임포트
import * as RN from 'react-native'
import * as EL from 'react-native-elements'
import {SafeAreaView} from 'react-navigation' 
import H from './src/components/Header' 
import SwitchNavigator from './src/navigation/SwitchNavigator'
import C from 'rn-class'


C.addComp(RN);
C.addComp(EL, "EL", null);
C.addComp({Header : H}, "Comp" );
C.addComp({SafeAreaView:SafeAreaView}, "Comp");  
C.addComp(RN.Picker.Item, "PickerItem")

const App = () => {
 
  useEffect(() => {
        __DEV__ && KeepAwake.activate() ;
        console.disableYellowBox =true; 
   }, []);



  return (
    <Fragment>
      <C.Comp.SafeAreaView forceInset={{top: 'never'}} cls="flx1">
        <SwitchNavigator/> 
      </C.Comp.SafeAreaView>
    </Fragment>
  );
};

export default App;


 // let setLang = async ()  =>{
  //   // let lan = await AsyncStorage.getItem('user:lan')
  //   // if(!lan){
  //   //   lan = "en";
  //   // }
  //   // console.log(">>>>>>>>>>>>>>>" , lan);
  //   i18n.locale = "ko";
  // }