import React from 'react';
import {View, Text} from 'react-native';
import HeaderAuthen from '../../components/Header/HeaderAuthen';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
import {getFontXD} from '../../Config/Functions';
import Login from './Login';
import Registor from './Registor';

const Tab = createMaterialTopTabNavigator();

const Authen = (props) => {
  return (
    <View style={{flex: 1}}>
      <HeaderAuthen />
      <View style={{flex: 1, backgroundColor: 'white'}}>
        <Tab.Navigator
          initialRouteName="Login"
          tabBarOptions={{
            activeTintColor: '#0045C8',
            labelStyle: {fontSize: getFontXD(42), fontWeight: '700'},
            style: {
              justifyContent: 'center',
              marginHorizontal: 40,
              elevation: 0,
            },
          }}>
          <Tab.Screen
            name="LOGIN"
            component={Login}
            options={{tabBarLabel: 'Đăng nhập'}}
          />
          <Tab.Screen
            name="REGISTOR"
            component={Registor}
            options={{tabBarLabel: 'Đăng ký'}}
          />
        </Tab.Navigator>
      </View>
    </View>
  );
};

export default Authen;
