export interface ConfirmOptions{ /** Dialog title -- rendered as a slotted `

`, which also drives the dialog's accessible name (see dialog.ts). */ title:string; /** Optional supporting text rendered below the title. */ description?:string; /** Confirm button label. Defaults to the localized `'confirm'` message (`'Confirm'` in English). */ confirmLabel?:string; /** Cancel button label. Defaults to the localized `'cancel'` message (`'Cancel'` in English). */ cancelLabel?:string; /** `'danger'` fills the confirm button with `--lr-color-danger` instead of `--lr-color-brand` -- for destructive actions. */ variant?:'neutral'|'danger';} /** * Show a confirmation modal, resolving `true` only when the confirm button * is pressed -- Escape, a backdrop click, and the cancel button all resolve * `false`. A drop-in replacement for `window.confirm()`. * * Mounts a transient `` for the duration of the call and * removes it once settled, rather than reusing a persistent page-level * region (contrast `lr-toast`'s `toaster.ts`). Concurrent calls remain distinct dialogs in the * shared overlay stack, each with a lifetime tied to its own returned promise and nothing left * mounted after that request settles. * * Every dismissal path (confirm button, cancel button, Escape, backdrop * click) funnels through ``'s own `close()`/`lr-close` * event, so there is exactly one place that resolves the promise and tears * the dialog down. Because that event is cancelable, a veto leaves this * promise pending and the transient dialog mounted until a later accepted * close. * * @example * const ok = await confirm({ * title: 'Delete conversation?', * description: 'This cannot be undone.', * confirmLabel: 'Delete', * variant: 'danger', * }); * if (ok) deleteConversation(); */ export declare function confirm(options:ConfirmOptions):Promise;