import { MenuStore } from './MenuStore'; import { BasePopupHandle } from '../../utils/popups/BasePopupHandle'; /** * Controls a menu imperatively, and associates `Menu.Trigger`s rendered outside * the root with it. Create one with `Menu.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 MenuHandle extends BasePopupHandle { constructor(); /** * Points the positioner at the trigger the menu was opened by. Without this an * imperative open would anchor to whatever was last pressed. */ protected associateTrigger(store: MenuStore, triggerNode: unknown): void; /** * Opens the menu, anchored to the trigger with the given id. * * Call this from an event handler or an effect, never during rendering. * * @param triggerId The `nativeID` of a mounted `Menu.Trigger` carrying this handle. */ open(triggerId: string): void; /** * Closes the menu. * * Call this from an event handler or an effect, never during rendering. */ close(): void; /** * Whether the menu is open. `false` while no root is attached. */ get isOpen(): boolean; } /** * Creates a handle that connects a `Menu.Root` to `Menu.Trigger`s rendered * outside it, and controls it imperatively. */ export declare function createMenuHandle(): MenuHandle; //# sourceMappingURL=MenuHandle.d.ts.map