/** * Themed confirmation dialog. * * A deliberately small primitive: one question, two answers, resolved as a * promise. It exists so a declarative `confirm` on a menu item needs no host * wiring at all — applications that already own a modal system replace it * wholesale through `RowMenuConfig.confirmHandler` rather than restyling this. * * Everything visual comes from theme tokens, so the dialog inherits the grid's * mode and variant without configuration. * * @packageDocumentation */ /** Text and tone of a single confirmation. */ export interface ConfirmDialogOptions { readonly title: string; readonly message: string; readonly confirmLabel: string; readonly cancelLabel: string; /** Styles the confirming button as destructive. */ readonly danger?: boolean; /** * Any element inside the owning grid — typically the control that triggered * the confirmation. Used solely to resolve which grid's portal host the dialog * is appended to, so it wears that grid's mode and variant on a page hosting * several differently-themed grids. * * Optional: when omitted the previously focused element is used, which is the * triggering control in every interactive path. Falls back to ``. */ readonly ownerEl?: HTMLElement | null; } /** * Opens a modal confirmation and resolves with the user's answer. * * Resolves `false` for every dismissal route — Cancel, Escape, or a click on * the backdrop — so a caller only has to handle the affirmative case. * * Focus moves to the confirming button on open and is restored to the * previously focused element on close, so a keyboard user is never dropped at * the top of the document. * * @param options - Text and tone of the question. * @returns `true` when confirmed, `false` when dismissed. */ export declare function openConfirmDialog(options: ConfirmDialogOptions): Promise; //# sourceMappingURL=confirm-dialog.d.ts.map