import React, {Fragment, useEffect} from 'react';
import {
  SafeAreaView,
  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/Popup/_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 H from './Src/Component/Header' 

import C from 'rn-class'

C.addComp(RN);
C.addComp(EL, "EL");
C.addComp({Header : H}, "Comp" );

const App = () => {
 
  useEffect(() => {
        console.log(">>>>>>>>>>>>>>>>>>:")
        __DEV__ && KeepAwake.activate();
   }, []);



  return (
    <Fragment>
      <C.SafeAreaView  cls="flx1">
        {/* <AcceptTerms/> */} 
        <Main/> 
      </C.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";
  // }