import { AlertDialogProps, AlertProps } from "@chakra-ui/react"; import { ReactElement } from "react"; /** Props accepted for backward compatibility but never read by AlertDialog. */ export type AlertDialogDeadProps = { /** @deprecated Never read — the dialog already has role="alertdialog". */ addRole?: AlertProps["addRole"]; /** @deprecated Never read — use `tone`. */ colorScheme?: AlertProps["colorScheme"]; /** @deprecated Never read — the dialog always uses Chakra's default size. */ size?: AlertProps["size"]; /** @deprecated Never read — use `tone`. */ status?: AlertProps["status"]; /** @deprecated Never read — use `tone`. */ variant?: AlertProps["variant"]; /** @deprecated Never read — React strips `key` before props arrive. */ key?: string | number; }; /** Fixed Cancel/Confirm dialog; `tone="danger"` fills Confirm red, otherwise it is primary. */ export type AlertDialogsProps = Pick & AlertDialogDeadProps & { title: string; /** Rendered inside the dialog body. */ content: ReactElement; isCentered?: boolean; /** Defaults to "Confirm". */ confirmButtonText?: string; /** Defaults to "Cancel"; Cancel calls `onClose` and holds `leastDestructiveRef`. */ cancelButtonText?: string; /** Shows a spinner on the Confirm button. */ isConfirmLoading?: boolean; /** Fires on Confirm click; does not close the dialog — call `onClose` yourself. */ onConfirm: () => void; /** Defaults to "default" (primary Confirm); "danger" makes Confirm red. */ tone?: "default" | "danger"; /** `sx` for the dialog content box. */ ContentStyle?: React.CSSProperties; headerStyle?: React.CSSProperties; bodyStyle?: React.CSSProperties; footerStyle?: React.CSSProperties; closeButtonStyle?: React.CSSProperties; /** Raw style escape hatch for the Cancel button. */ button1Style?: React.CSSProperties; /** Raw style escape hatch for Confirm; prefer `tone` for a danger action. */ button2Style?: React.CSSProperties; };