/** * Copyright IBM Corp. 2023, 2026 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { KeyboardEvent, RefObject } from 'react'; type RegisterItemPayload = { ref: RefObject; disabled: boolean; }; type ActionType = { type: 'enableIcons' | 'enableSelectableItems'; } | { type: 'registerItem'; payload: RegisterItemPayload; }; type StateType = { isRoot: boolean; hasIcons: boolean; hasSelectableItems: boolean; size: 'xs' | 'sm' | 'md' | 'lg' | null; items: RegisterItemPayload[]; requestCloseRoot: (e: Pick, 'type'>) => void; }; declare function menuReducer(state: StateType, action: ActionType): { hasIcons: boolean; isRoot: boolean; hasSelectableItems: boolean; size: "xs" | "sm" | "md" | "lg" | null; items: RegisterItemPayload[]; requestCloseRoot: (e: Pick, "type">) => void; }; type MenuContextProps = { state: StateType; dispatch: (props: ActionType) => void; }; declare const MenuContext: import("react").Context; export { MenuContext, menuReducer };