import { ConfirmationDialogRuntimeApi } from "@trackunit/iris-app-runtime-core-api"; /** * Shows a modal confirmation dialog and returns the user's choice as a Promise. * * Resolves to `"PRIMARY"`, `"SECONDARY"`, or `"CLOSE"` depending on which button * (or dismiss action) the user selects. * * **When to use:** * - Use `useConfirmationDialog` for destructive or irreversible actions (delete, discard * changes, revoke access) where you need explicit user consent before proceeding. * - Use `useToast` instead when you only need to *inform* the user — toasts are * non-blocking and don't require a decision. * - Do **not** build custom confirmation modals — this hook connects to the host-provided * dialog so the UX is consistent across the platform. * * @example * ```tsx * import { Button } from "@trackunit/react-components"; * import { useConfirmationDialog } from "@trackunit/react-core-hooks"; * * const DeleteButton = ({ onDelete }: { onDelete: () => void }) => { * const { confirm } = useConfirmationDialog(); * * return ( * * ); * }; * ``` */ export declare const useConfirmationDialog: () => ConfirmationDialogRuntimeApi;