import { RouteRecordName } from "vue-router";

export type cacheType = {
  mode: string;
  name?: RouteRecordName;
};

export type positionType = {
  startIndex?: number;
  length?: number;
};

export type appType = {
  sidebar: {
    opened: boolean;
    withoutAnimation: boolean;
    // 判断是否手动点击Hamburger
    isClickHamburger: boolean;
  };
  layout: string;
  device: string;
  searchParams: {
    basic: Record<string, string> | null;
    pagination: any;
  };
  companyNo: string;
};

export type multiType = {
  path: string;
  parentPath: string;
  name: string;
  meta: any;
  query?: object;
};

export type setType = {
  title: string;
  fixedHeader: boolean;
  hiddenSideBar: boolean;
};

export type userType = {
  token: string;
  name?: string;
  verifyCode?: string;
  currentPage?: number;
  menuActions: string;
  companyList: Record<string, string>[];
  currentCompany: Record<string, string> | null;
  isSuperUser: boolean;
  system_version: string[];
  swithingCompany: boolean;
  info: null | Record<string, string>;
  disabledCompany: boolean;
  systemInfo: Record<string, string>;
  level: string;
};

export type resType = {
  code: number;
  data?: any;
  message: string;
};
