--- ## ConfirmDialog Pre-configured Dialog for confirming a single, often destructive action. Replaces the native `window.confirm()` with a styleable, focus-trapped, keyboard-accessible modal that matches the design system's intent palette. `onConfirm` may be `async`; while the returned promise is pending the dialog locks itself (no backdrop dismiss, no escape, confirm button shows a spinner). Auto-closes on resolve. **Import:** `import { ConfirmDialog } from '@urbicon-ui/blocks';` ### Examples ```svelte { await deleteProject(id); }} /> ``` ### Api | Prop | Type | Required | Default | Description | | --- | --- | :---: | --- | --- | | title | `string` | yes | | Heading shown in the dialog header. | | cancelLabel | `string` | no | | Label of the cancel button. Defaults to the localized `button.cancel`. | | children | `Snippet` | no | | Optional richer markup rendered below `description`. | | closeOnBackdropClick | `boolean` | no | true | Whether the backdrop click cancels. | | closeOnEscape | `boolean` | no | true | Whether Escape cancels. | | confirmIntent | `ConfirmIntent` | no | | Override for the confirm button intent. Defaults to , with `neutral` upgraded to `primary` for visual affordance. | | confirmLabel | `string` | no | | Label of the confirm button. Defaults to the localized `button.confirm`. | | description | `string` | no | | Description rendered above the footer. Use `children` for richer markup. | | intent | `DialogIntent` | no | 'danger' | Accent on the dialog header strip. Drives the default `confirmIntent`. | | loading | `boolean` | no | false | Externally controlled loading flag. Combined with the internal `busy` flag from an async `onConfirm`. While truthy, both buttons are disabled and dismissal is blocked. | | onCancel | `() => void` | no | | Fired when the user cancels (button, backdrop, or Escape). | | onConfirm | `() => void | Promise` | no | | Confirm handler. May return a promise — the dialog stays open and shows a loading state while it resolves, then auto-closes on success. | | open | `boolean` | no | | Controls visibility. Supports bind:open. |