import * as React from 'react';
import { DataNode } from 'rc-tree/lib/interface';

export type IApp = {
  id: string;
  name: string;
  title: string;
  entry: string;
}

export type ICompany = {
  id: string;
  name: string;
  logo?: string;
  isDefault?: boolean;
}

export type IOrganization = {
  id: string;
  name: string;
  logo?: string;
  isDefault?: boolean;
}


export type IWindow = {
  id: string;
  name?: string;
  icon?: string;
  path?: string;
  component?:React.ReactNode;
  closable?: boolean;
}

export type IMenuData = {
  id?: string;
  pid?: string;
  appId?: string;
  title?: string;
  name?:string;
  path: string;
  icon?: string;
  type?: string;
  target?: string;
  description?: string;
};

export type IAction = {
  key: string;
  size?: 'large' | 'middle' | 'small';
  type?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default';
  label?: string;
  icon?: string | React.ReactNode;
  render?: () => React.FC;
  handle?: (e: Event) => void;
};

export interface IDataNode extends DataNode {
  id?: string | number;
  pid?: string | number;
  value?: any;
  type?: string;
  parent?: IDataNode;
}

