import { BeanStub, type NamedBean, type MenuItemDef, type Column, type IRowNode } from 'ag-grid-community'; import type { MenuActionParams } from './menuItemRegistry'; /** * Menu utility functions. */ export declare class MenuUtils extends BeanStub implements NamedBean { beanName: "menuUtils"; isItemVisible(item: MenuItemDef | null): boolean; buildActionParams(column: Column | null, node: IRowNode | null, value: unknown): MenuActionParams; } /** The GridApi surface the popup-parent helper needs. */ interface PopupParentApi { getGridOption?(key: 'popupParent'): unknown; setGridOption?(key: 'popupParent', value: HTMLElement | null): void; } /** * Open a menu popup with the popup parent defaulted to the document body. * * Community's PopupService appends popups to the grid root element and clamps * their position inside the grid's rectangle (the root wrapper has * overflow:hidden), so a menu opened near the grid edge is cut off at the * grid's boundary. LibreGrid menus instead render in a body-level popup by * default — clamped to the viewport, so they can extend outside the grid * footprint. An app-configured `popupParent` is always honoured. * * The option is restored immediately: `addPopup` appends the wrapper and runs * the position callback synchronously, so the override only needs to live for * the duration of `open`. */ export declare function withViewportPopupParent(api: PopupParentApi | undefined, open: () => void): void; export {};