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: The created modal node instance * - 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 or backdrop click (if enabled) * * @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; readonly promiseHandler: Promise; };