import {Center} from '@gluestack-ui/themed/build/components/Center';
import {
  createNativeStackNavigator,
  NativeStackNavigationProp,
} from '@react-navigation/native-stack';
import {RootState} from '@redux/store';
import {Text} from 'react-native';
import {useSelector} from 'react-redux';

export const CalendarTabName = 'Calendar';

export type CalendarStackNavigatorParamList = {
  Overview: undefined;
};

const CalendarStack =
  createNativeStackNavigator<CalendarStackNavigatorParamList>();

export type CalendarScreenNavigationProp =
  NativeStackNavigationProp<CalendarStackNavigatorParamList>;

function CalendarTab() {
  const lang = useSelector((state: RootState) => state.appVariables.lang);

  //const navigation = useNavigation<CalendarScreenNavigationProp>();

  return (
    <CalendarStack.Navigator initialRouteName="Overview">
      <CalendarStack.Screen
        name="Overview"
        options={{
          title: lang.navigation.home.calendar,
          headerShown: true,
        }}
        component={CalendarScreen}
      />
    </CalendarStack.Navigator>
  );
}

function CalendarScreen() {
  return (
    <Center>
      <Text>Calendar</Text>
    </Center>
  );
}

export default CalendarTab;
