/** * SvPopconfirm - a lightweight confirm step in a popover anchored to its * trigger, for a low-stakes destructive action ("Delete this row?") where a * full modal dialog would be too heavy. Click the anchor to reveal a short * message plus Cancel / Confirm buttons; confirming runs `onConfirm` and closes. * Built on SvPopover, so it is portalled, positioned by the shared engine, and * dismisses on Escape / outside-click. * * ```svelte * remove(row)}> * {#snippet anchor()}Delete{/snippet} * * ``` */ import type { Snippet } from 'svelte'; import type { Placement } from './positioning'; type Props = { /** Controlled open state (bindable). */ open?: boolean; onOpenChange?: (open: boolean) => void; /** Bold prompt, e.g. "Delete this row?". */ title?: string; /** Optional longer explanation under the title. */ description?: string; confirmLabel?: string; cancelLabel?: string; /** Variant for the confirm button (use `danger` for destructive actions). */ confirmVariant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger'; /** Runs when the user confirms; the popover then closes. */ onConfirm?: () => void; /** Runs when the user cancels (or dismisses); the popover then closes. */ onCancel?: () => void; /** Preferred placement; flips when there is no room. Default `top`. */ placement?: Placement; ariaLabel?: string; /** The trigger that opens the confirm. */ anchor?: Snippet; }; declare const SvPopconfirm: import("svelte").Component; type SvPopconfirm = ReturnType; export default SvPopconfirm;