/**
 * React Native Full App (https://store.enappd.com/product/react-native-full-app)
 *
 * Copyright © 2019-present Enappd. All rights reserved.
 *
 * This source code is licensed as per the terms found in the
 * LICENSE.md file in the root directory of this source tree.
 */

import { createSwitchNavigator, createAppContainer } from 'react-navigation';
import AuthCheck from '../views/firebase/AuthCheck/AuthCheck';
import AuthNavigator from './AuthNavigation';
import AppNavigator from './AppNavigation';
// import { createStackNavigator } from '@react-navigation/stack';
// import { createStackNavigator } from 'react-navigation-stack';
import { NavigationContainer } from '@react-navigation/native';

// const SwitchNav = createStackNavigator();

// const switchNavigator = () => {
//   return(
//   <NavigationContainer>
//     <SwitchNav.Navigator initialRouteName='Landing' headerMode="none">
//       <SwitchNav.Screen name="Landing" component={AuthCheck}/>
//       <SwitchNav.Screen name="Auth" component={AuthNavigator}/>
//       <SwitchNav.Screen name="App" component={AppNavigator}/>
//     </SwitchNav.Navigator>
//   </NavigationContainer>)
// }
// export default switchNavigator;

const SwitchNavigator = createSwitchNavigator(
  {
    Landing: AuthCheck,
    Auth: AuthNavigator,
    App: AppNavigator,
  },
  {
    initialRouteName: 'Landing',
  }
);

const AppWithNavigation = createAppContainer(SwitchNavigator);
export default AppWithNavigation;
