import { CommonActions, useNavigation } from '@react-navigation/native';
import { View } from 'react-native';
import { BigText, Button, PageWrapper } from 'src/components';
import { NAVIGATION_PAGES } from 'src/types';
import { ButtonVariants } from 'src/types/components';

const UnauthenticatedProfileScreen = () => {
  const navigation = useNavigation();

  return (
    <PageWrapper>
      <View style={{ marginTop: 15, display: 'flex', gap: 10 }}>
        <BigText children={'You are not logged in. Please login or register to access profile.'} />
        <Button
          onPress={() =>
            navigation.dispatch(
              CommonActions.reset({
                index: 1,
                routes: [{ name: NAVIGATION_PAGES.WELCOME }]
              })
            )
          }
          variant={ButtonVariants.FILL}
        >
          Go to login/register
        </Button>
      </View>
    </PageWrapper>
  );
};

export default UnauthenticatedProfileScreen;
