/**
 * Note the name userXId here, it refers to the id of the user being visited
 */
import {createStackNavigator} from '@react-navigation/stack';
import {
  CommentBaseType,
  MomentTagType,
  MomentType,
  ScreenType,
  SearchCategoryType,
} from '../../types';

export type MainStackParams = {
  SuggestedPeople: {
    screenType: ScreenType;
  };
  Upload: {
    screenType: ScreenType;
  };
  RequestContactsAccess: {
    screenType: ScreenType;
  };
  DiscoverUsers: {
    searchCategory: SearchCategoryType;
  };
  Profile: {
    userXId: string | undefined;
    screenType: ScreenType;
  };
  SettingsScreen: {};
  PrivacyScreen: {};
  AccountTypeScreen: {};
  SocialMediaTaggs: {
    socialMediaType: string;
    userXId: string | undefined;
    screenType: ScreenType;
  };
  CameraScreen: {
    screenType: ScreenType;
    selectedCategory?: string;
  };
  EditMedia: {
    media: {uri: string; isVideo: boolean};
    screenType: ScreenType;
    selectedCategory?: string;
  };
  CaptionScreen: {
    screenType: ScreenType;
    media?: {uri: string; isVideo: boolean; videoDuration: number | undefined};
    selectedCategory?: string;
    selectedTags?: MomentTagType[];
    moment?: MomentType;
  };
  ChoosingCategoryScreen: {
    newCustomCategory?: string;
  };
  TagFriendsScreen: {
    media: {
      uri: string;
      isVideo: boolean;
      videoDuration: number | undefined;
    };
    selectedTags?: MomentTagType[];
  };
  TagSelectionScreen: {
    selectedTags: MomentTagType[];
  };
  IndividualMoment: {
    moment: MomentType;
    userXId: string | undefined;
    screenType: ScreenType;
  };
  MomentCommentsScreen: {
    moment_id: string;
    userXId: string | undefined;
    screenType: ScreenType;
    comment_id?: string;
  };
  CommentReactionScreen: {
    comment: CommentBaseType;
    screenType: ScreenType;
  };
  FriendsListScreen: {
    userXId: string | undefined;
    screenType: ScreenType;
  };
  EditProfile: {
    userId: string;
    username: string;
  };
  CategorySelection: {
    newCustomCategory: string | undefined;
  };
  CreateCustomCategory: {
    existingCategories: string[];
    fromScreen: 'ChoosingCategoryScreen' | 'CategorySelection';
  };
  Notifications: {
    screenType: ScreenType;
  };
  MomentUploadPrompt: {
    screenType: ScreenType;
    momentCategory: string;
    profileBodyHeight: number;
    socialsBarHeight: number;
  };
  AnimatedTutorial: {
    screenType: ScreenType;
  };
  UpdateSPPicture: {
    editing: boolean;
  };
  BadgeSelection: {
    editing: boolean;
  };
  MutualBadgeHolders: {
    badge_id: string;
    badge_title: string;
    badge_img: string;
  };
  InviteFriendsScreen: undefined;
  SPWelcomeScreen: {};
  ChatList: undefined;
  Chat: undefined;
  NewChatModal: undefined;
};

export const MainStack = createStackNavigator<MainStackParams>();
