/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-empty-interface */
import type { BottomTabScreenProps } from '@react-navigation/bottom-tabs';
import type { CompositeScreenProps, NavigatorScreenParams } from '@react-navigation/native';
import type { NativeStackScreenProps } from '@react-navigation/native-stack';

export type StackParamList = {
  Tab: NavigatorScreenParams<TabParamList>;
  Landing: { accessToken: string; refreshToken: string };
  Call: undefined;
  Rooms: undefined;
  Profile: { userId: string };
  AdminProfile: undefined;
  EditProfile: undefined;
  Room: { roomId: string };
  Chat: { roomId: string };
  Settings: undefined;
  MagicLinkConfirm: { email: string; verificationCode: string };
};

export type RootStackScreenProps<T extends keyof StackParamList> = NativeStackScreenProps<
  StackParamList,
  T
>;

export type TabParamList = {
  DashboardTab: undefined;
  Notification: undefined;
  Chat: undefined;
  Search: undefined;
};

export type RootTabScreenProps<T extends keyof TabParamList> = CompositeScreenProps<
  BottomTabScreenProps<TabParamList, T>,
  // @ts-ignore
  RootStackScreenProps<keyof StackParamList>
>;

declare global {
  namespace ReactNavigation {
    interface RootParamList extends StackParamList {}
  }
}
