import { PermissionsEnum } from '@/enums/permissionsEnum';
export interface ActionItem {
  onClick?: Fn;
  label?: string;
  icon?: string;
  key?: string;
  popConfirm?: PopConfirm;
  size?: string;
  type?: string;
  plain?: boolean;
  round?: boolean;
  circle?: boolean;
  loading?: boolean;
  disabled?: boolean;
  autofocus?: boolean;
  nativeType?: string;
  autoInsertSpace?: boolean;
  // 权限编码控制是否显示
  auth?: PermissionsEnum | PermissionsEnum[] | string | string[];
  // 业务控制是否显示
  ifShow?: boolean | ((action: ActionItem) => boolean);
}

export interface PopConfirm {
  title: string;
  okText?: string;
  cancelText?: string;
  confirm: Fn;
  cancel?: Fn;
  icon?: string;
}
