import {defaultHeaderStyle} from '@caj/configs/colors';
import {RootStackNavigatorParamList} from '@caj/Navigation';
import {RootState} from '@caj/redux/store';
import {
  createNativeStackNavigator,
  NativeStackNavigationProp,
} from '@react-navigation/native-stack';
import {Center, Text} from 'native-base';
import {useSelector} from 'react-redux';

export const MapsTabName = 'Maps';

export type MapsStackNavigatorParamList = {
  Overview: undefined;
};

const MapsStack = createNativeStackNavigator<MapsStackNavigatorParamList>();

export type MapsScreenNavigationProp =
  NativeStackNavigationProp<MapsStackNavigatorParamList>;

function MapsTab() {
  const lang = useSelector((state: RootState) => state.appVariables.lang);
  const theme = useSelector(
    (state: RootState) => state.appVariables.preferences.theme,
  );

  return (
    <MapsStack.Navigator>
      <MapsStack.Screen
        name="Overview"
        options={{
          title: 'Maps',
          headerShown: true,
          ...defaultHeaderStyle(theme),
        }}
        component={MapsScreen}
      />
    </MapsStack.Navigator>
  );
}

function MapsScreen() {
  return <Center>MapsScreen</Center>;
}

export default MapsTab;
