import type { ConfirmNode } from '../../core/index.js'; import type { ConfirmProps } from './type.js'; /** * Creates and manages a Confirm modal. * * @typeParam BackgroundValue - Type of background data passed to BackgroundComponent * @param args - Confirm modal configuration options * @returns Object containing modalNode and promiseHandler * * @remarks * - modalNode: live getter for the modal node; undefined while the modal is * queued before the ModalProvider mounts, then set once the queue flushes * - promiseHandler: Promise that resolves to true if confirmed, false if cancelled * - Returns true only when explicitly confirmed via the confirm action * - Returns false for cancel action, backdrop click (if enabled), or abort * * @example * ```tsx * const { modalNode, promiseHandler } = confirmHandler({ * title: 'Delete Item?', * content: 'This action cannot be undone.', * }); * * const confirmed = await promiseHandler; * if (confirmed) { * await deleteItem(); * } * ``` */ export declare const confirmHandler: (args: ConfirmProps) => { readonly modalNode: ConfirmNode | undefined; promiseHandler: Promise; cancel: import("../../@aileron/declare").Fn<[], void>; };