import { AriaMenuProps } from '@react-types/menu'; import { DOMAttributes, KeyboardEvents, KeyboardDelegate, Key } from '@react-types/shared'; import { RefObject } from 'react'; import { TreeState } from '@react-stately/tree'; interface MenuAria { /** Props for the menu element. */ menuProps: DOMAttributes; } interface AriaMenuOptions extends Omit, "children">, KeyboardEvents { /** Whether the menu uses virtual scrolling. */ isVirtualized?: boolean; /** * An optional keyboard delegate implementation for type to select, * to override the default. */ keyboardDelegate?: KeyboardDelegate; } interface MenuData { onClose?: () => void; onAction?: (key: Key, item: any) => void; } declare const menuData: WeakMap, MenuData>; /** * Provides the behavior and accessibility implementation for a menu component. * A menu displays a list of actions or options that a user can choose. * @param props - Props for the menu. * @param state - State for the menu, as returned by `useListState`. */ declare function useMenu(props: AriaMenuOptions, state: TreeState, ref: RefObject): MenuAria; export { AriaMenuOptions, MenuAria, menuData, useMenu };