import { NavigatorScreenParams } from '@react-navigation/native';

// 根堆栈导航类型
export type RootStackParamList = {
  Main: NavigatorScreenParams<MainTabParamList>;
  Login: undefined;
  ResetPassword: undefined;
};

// 主标签导航类型
export type MainTabParamList = {
  '爱车': NavigatorScreenParams<HomeStackParamList>;
  '个人中心': undefined;
};

// 首页堆栈导航类型
export type HomeStackParamList = {
  Home: undefined;
  DeviceList: undefined;
  BindIndex: undefined;
  SnBind: undefined;
  ConfirmBind: undefined;
  DeviceMap: undefined;
  DeviceSet: undefined;
  UnlockSetting: undefined;
  BleDistance: undefined;
  DeviceShare: undefined;
  AddShare: undefined;
  ShareQrcode: undefined;
  TestBule: undefined;
  ShareDetailScreen: undefined;
  ExpiredKeysScreen: undefined;
};

// 导航属性类型
declare global {
  namespace ReactNavigation {
    interface RootParamList extends RootStackParamList {}
  }
}

// 通用导航属性类型
export type NavigationProps = {
  navigation: any;
  route: any;
};