import type { ReactNode } from 'react';
import type { ButtonProps } from '@mui/material';

export interface OpenConfirmProps {
  title: ReactNode;
  content: ReactNode;
  onConfirm?: (close: () => void) => void;
  onCancel?: () => void;
  showCancelButton?: true | false;
  confirmButtonText?: string;
  cancelButtonText?: string;
  confirmButtonProps?: ButtonProps;
  cancelButtonProps?: ButtonProps;
}

export type UpdateConfirmProps = Partial<Pick<OpenConfirmProps, 'title' | 'content'>>;

export type OpenConfirm = (params: OpenConfirmProps) => void;
export type CloseConfirm = () => void;
export type UpdateConfirm = (params: UpdateConfirmProps) => void;
