import { USER_SCOPES } from '@/constants/entities/Scope';

export interface Button {
  id: string;
  label?: string;
  tooltip?: string;
  scopes?: USER_SCOPES[];
  componentPath?: string;
  componentProps?: Record<string, unknown>;
  actions?: Record<string, { (): void }>;
  props?: Record<string, unknown>;
  dialog?: Record<string, unknown>;
  mandatory?: boolean;
  force?: boolean;
  getData?: { (model: unknown): unknown };
  callBack?: { (): void };
  onBeforeAction?: (buttonCode: string, data: any) => void;
  visible: boolean;
}

export interface SubmitParams {
  buttonId: string;
  data: Record<string, unknown>;
  force: boolean;
}
