import { ComponentProps } from "react"
import { BottomTabScreenProps } from "@react-navigation/bottom-tabs"
import {
  CompositeScreenProps,
  NavigationContainer,
  NavigatorScreenParams,
} from "@react-navigation/native"
import { NativeStackScreenProps } from "@react-navigation/native-stack"

// Main Tab Navigator types
export type MainTabParamList = {
  Showroom: { queryIndex?: string; itemIndex?: string }
  Community: undefined
}

// App Stack Navigator types
export type AppStackParamList = {
  Welcome: undefined
  AuthWelcome: undefined
  Login: undefined
  Register: undefined
  ForgotPassword: undefined
  Main: NavigatorScreenParams<MainTabParamList>
  Profile: undefined
  Settings: undefined
  Security: undefined
  ChangePassword: undefined
  ChangeEmail: undefined
  SessionManagement: undefined
  About: undefined
  Language: undefined
  Theme: undefined
  // 🔥 Your screens go here
  // IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST
}

export type AppStackScreenProps<T extends keyof AppStackParamList> = NativeStackScreenProps<
  AppStackParamList,
  T
>

export type MainTabScreenProps<T extends keyof MainTabParamList> = CompositeScreenProps<
  BottomTabScreenProps<MainTabParamList, T>,
  AppStackScreenProps<keyof AppStackParamList>
>

export interface NavigationProps extends Partial<
  ComponentProps<typeof NavigationContainer<AppStackParamList>>
> {}
