/* AuthState */
export interface AuthState {
  isLoaded: boolean
  permissionCodes: string[]
  roleCodes: string[]
  menuList: Menu.MenuOptions[]
  routeName: string
}

/* AppState */
export interface AppState {
  activeTopMenuPath: string
  isCollapse: boolean
  language: string
}

/* UserState */
export interface UserState {
  token: string | undefined
  expireIn: number
  user: UserInfo
  permissionCodes: string[]
  roleCodes: string[]
}

export type UserInfo = {
  userId?: number
  account: string
  userName: string
  orgId: string
  nickname: string
  userType: string
}

/* SettingState */
export interface SettingState {
  layout: LayoutType
  breadcrumb: boolean
  breadcrumbIcon: boolean
  footer: boolean
  isDark: boolean
  primary: string
  asideInverted: boolean
  headerInverted: boolean
  showTaps: boolean
  tagsViewIcon: boolean
}

/* TagsViewState */
export interface TagsViewState {
  visitedViews: TagView[]
  cachedViews: string[]
  selectedTag?: TagView
}
export interface TagView {
  /** 页签名称 */
  name: string
  /** 页签标题 */
  title: string
  /** 页签路由路径 */
  path: string
  /** 页签路由完整路径 */
  fullPath: string
  /** 页签图标 */
  icon?: string
  /** 是否固定页签 */
  affix?: boolean

  /** 隐藏标签 */
  noTagsView?: boolean
  /** 是否开启缓存 */
  keepAlive?: boolean
  /** 路由查询参数 */
  query?: any
}
