import NotLoggedIn from '@caj/components/NotLoggedIn';
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 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 theme = useSelector(
    (state: RootState) => state.appVariables.preferences.theme,
  );

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

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

export default CalendarTab;
