import './dialog.script'; import { type DialogHandle, type DialogOpenOptions } from './dialog-types'; export type InstallDialogsOptions = { /** Parent node for the imperative host mount. Default: `document.body`. */ mount?: ParentNode; }; /** * Install document listeners for dialog events and `data-dialog-*` attributes. * Idempotent — safe to call from app boot and Storybook decorators. * Returns an uninstall function for tests / HMR. */ export declare function installDialogs(options?: InstallDialogsOptions): () => void; /** Tear down listeners and the host dialog (mainly for tests). */ export declare function uninstallDialogs(): void; /** Currently open dialog id, or `null`. */ export declare function getOpenDialogId(): string | null; /** Open a named dialog by id, or fill/open the imperative host dialog. */ export declare function openDialog(idOrOptions: string | DialogOpenOptions): void; /** Close the current dialog, or a specific id. */ export declare function closeDialog(id?: string): void; /** Toggle a named dialog by id. */ export declare function toggleDialog(id: string): void; /** * Bound handle for a named dialog id, or the imperative host when `id` is omitted. * A bound handle's `open()` always targets that id; pass options only on unbound handles. * * @example * const confirm = createDialogHandle(); * confirm.open({ title: 'Delete?', body: '…', actions: […] }); * * const profile = createDialogHandle('edit-profile'); * profile.open(); */ export declare function createDialogHandle(id?: string): DialogHandle;