import { DialogStore } from './DialogStore'; import { BasePopupHandle } from '../../utils/popups/BasePopupHandle'; /** * Controls a dialog imperatively, and associates `Dialog.Trigger`s rendered * outside the root with it. Create one with `Dialog.createHandle()` and pass it * to the root's and the triggers' `handle` prop. * * The imperative methods only take effect while a root using this handle is * mounted; calls made before one attaches (or after it unmounts) are ignored. */ export declare class DialogHandle extends BasePopupHandle, DialogStore> { constructor(componentName?: string); /** * Opens the dialog, optionally associating it with a trigger. * * Call this from an event handler or an effect, never during rendering. * * @param triggerId The id of a mounted `Dialog.Trigger` carrying this handle, * or `null` to open without associating one. */ open(triggerId?: string | null): void; /** * Opens the dialog with a payload, without associating it with a trigger. The * payload reaches the root's children when they are a function. * * Call this from an event handler or an effect, never during rendering. */ openWithPayload(payload: Payload): void; /** * Closes the dialog. * * Call this from an event handler or an effect, never during rendering. */ close(): void; /** * Whether the dialog is open. `false` while no root is attached. */ get isOpen(): boolean; } /** * Creates a handle that connects a `Dialog.Root` to `Dialog.Trigger`s rendered * outside it, and controls it imperatively. */ export declare function createDialogHandle(): DialogHandle; //# sourceMappingURL=DialogHandle.d.ts.map