/*
 * @Description:: 请补充填写
 * @Version: 请配置版本号
 * @Author: 舟舟
 * @Date: 2022-06-25 22:53:51
 * @LastEditors: 舟舟
 * @LastEditTime: 2022-07-30 19:51:25
 * @FilePath: /ouicai_web_framework_vite_ep_nolang/src/stores/interface/index.ts
 */
// 变量名对应含义请在 /stores/* 里边找
import type { Component } from 'vue'

export interface Layout {
    showDrawer: boolean
    shrink: boolean
    layoutMode: string
    mainAnimation: string
    menuWidth: number
    menuDefaultIcon: string
    menuCollapse: boolean
    menuUniqueOpened: boolean
    menuShowTopBar: boolean
    menuBackground: string
    menuColor: string
    menuActiveBackground: string
    menuActiveColor: string
    menuTopBarBackground: string
    headerBarTabColor: string
    headerBarBackground: string
    headerBarHoverBackground: string
    headerBarTabActiveBackground: string
    headerBarTabActiveColor: string
    headerBarHoverColor:string
    headerBarRightTabColor:string
    logoTitleColor:string
    shrinkButtonColor:string
    screenWidth?:number
    mainHeight?:number
    mainWidth?:number
}

export interface viewMenu {
    appId: number
    title: string
    path: string
    name?: string
    type?: string
    icon?: string
    keepaliveName?: string
    query?: anyObj
    params?: anyObj
    children?: viewMenu[]
    component?: Component
}


export interface appInfo{

    id:number
    name:string
    code:string
    active:string
    icon:string

}


export interface NavTabs {
    apps:Array<appInfo>
    activeIndex: number
    activeRoute: viewMenu | null
    tabsView: Array<viewMenu>
    tabFullScreen: Boolean
    tabsViewRoutes: Array<viewMenu>
    authNode: Map<string, string[]>
    allRoutes:Array<viewMenu>
}

export interface AdminInfo {
    id: number
    accountName: string
    avatar: string
    lastLoginTime: string
    token: string
    refreshToken: string
}

export interface TaskItem {
    // 任务唯一标识
    uuid: string
    // 创建时间
    createTime: string
    // 状态
    status: number
    // 命令
    command: string
    // 命令执行日志
    message: string[]
    // 显示命令执行日志
    showMessage: boolean
    // 失败阻断后续命令执行
    blockOnFailure: boolean
    // 执行结果回调
    callback: Function
}

export interface Terminal {
    show: boolean
    showDot: boolean
    taskList: TaskItem[]
    packageManager: string
    showPackageManagerDialog: boolean
    showConfig: boolean
    automaticCleanupTask: string
    port: string
}

export interface SiteConfig {
    site_name: string
    version: string
}
