import type { ReactNode } from "react"; /** * ConfirmDialog — controlled confirmation modal built on `Dialog`. * * Focuses Cancel on open (deliberate — NOT the destructive button). * `intent="destructive"` styles the confirm button with the destructive * variant. `confirmationPhrase` enables typed-confirmation guard: * the confirm button is disabled until the input value matches the * phrase exactly (case-sensitive). An empty string phrase is treated * as "no phrase required" (`!!confirmationPhrase`). Pressing Enter in * the input triggers confirm when `canConfirm` is true. * * `onConfirm` can be async. While the returned promise is pending, * both buttons are disabled and a `Loader2` spinner appears. On * resolve, the dialog closes via `onOpenChange(false)`. On reject, * the dialog stays open so the consumer can show their own error. * * @example * api.deleteProject(id)} * /> */ export interface ConfirmDialogProps { open: boolean; onOpenChange: (open: boolean) => void; title: ReactNode; description: ReactNode; confirmLabel?: ReactNode; cancelLabel?: ReactNode; intent?: "default" | "destructive"; confirmationPhrase?: string; onConfirm: () => void | Promise; loading?: boolean; } declare const ConfirmDialog: import("react").ForwardRefExoticComponent>; export { ConfirmDialog };