export type ConfirmOptions = { title: string; message?: string; }; export type ConfirmFn = (opts: ConfirmOptions) => Promise; /** * Confirmation provider. A host may supply its own `confirm` callback (its own * dialog / native confirm); otherwise the editor renders a built-in * ConfirmDialog. Components request confirmation via `requestConfirm()` and * never touch a dialog component directly. */ export type ConfirmController = { /** Resolve a confirmation; returns true to proceed. */ requestConfirm: ConfirmFn; /** Built-in dialog state (used only when no host `confirm` is supplied). */ readonly builtin: { open: boolean; title: string; message: string; }; /** Built-in dialog wiring. */ resolveBuiltin(ok: boolean): void; }; /** * Create a controller. Pass the host `confirm` callback if any; otherwise the * built-in dialog state drives confirmations. */ export declare function createConfirmController(getHostConfirm: () => ConfirmFn | undefined): ConfirmController; export declare function setConfirmController(c: ConfirmController): ConfirmController; export declare function useConfirm(): ConfirmController;