/*
 * @Author: your name
 * @Date: 2021-11-19 16:31:19
 * @LastEditTime: 2023-12-26 14:54:33
 * @LastEditors: code4eat awesomedema@gmail.com
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /KC-MiddlePlatform/src/typings.d.ts
 */

type SystemListItem = {
  //平台列表项
  icon?: string;
  id: string;
  name: string;
  url?: string;
  path: string;
};

export type TableRequestParamsType = {
  //KCtable组件request params
  pageSize?: number | undefined;
  current?: number | undefined;
  keyword?: string | undefined;
  [key: string]: any;
};

export type SpacicalPageParamsType = {
  //特殊页面参数项集合，用于有数
  contentType: number; //内容类型，0：一般，1.报告，2.大屏，2.填报
  path: string;
  reportId: number;
  url: string;
};

export type TableResponseDataType = {
  //KCtable组件response data
  totalCount?: number | undefined;
  pageSize?: number | undefined;
  totalPage?: string | undefined;
  current?: string | undefined;
  [key: string]: any;
};

declare interface PostMessageData {
  type: 'LOGOUT' | 'REFRESH' | 'DATA' | 'LOGIN';
  data?: any;
}
declare interface Window {
  stateFromTop: any;
  isParentApp?: boolean;
  postMessageToChild: (data: PostMessageData) => Promise<any>;
  removeListenner: (name: string) => Promise<any>;
}

declare interface Iframe {
  contentWindow: any;
}
