import { KeyboardEvent, RefObject, Dispatch, SetStateAction } from 'react'; import { FocusHoverState, MenuSelectEvent, Orientation, SubmenuType } from '../../menu/types'; import type { MenuItemRegistration } from './useMenu'; /** * Configuration options for the `useMenuKeyboard` hook. * All refs and callbacks are expected to be stable (created with `useRef` / `useCallback`). * * @private */ interface UseMenuKeyboardOptions { dir: string; orientation?: Orientation; parentRef: RefObject; submenuRefs: RefObject>; hoverTimeoutRef: RefObject; openSubmenus: Array; focusedItem: FocusHoverState; setFocusedItem: Dispatch>; getItemsByPath: (indexPath: number[]) => MenuItemRegistration[]; openSubmenu: (parentIndexPath: number[], target: HTMLElement, triggerEvent?: Event) => void; openSubmenuImmediate: (parentIndexPath: number[], target: HTMLElement, triggerEvent?: Event) => void; handleBackNavigation: () => void; closeAllSubmenus: () => void; onSelect?: (args: MenuSelectEvent) => void; onClose?: (event: Event) => void; } /** * Return value of the `useMenuKeyboard` hook. * * @private */ interface UseMenuKeyboardReturn { handleKeyDown: (e: KeyboardEvent) => void; } export declare const useMenuKeyboard: (opts: UseMenuKeyboardOptions) => UseMenuKeyboardReturn; export {};