/** * 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 ActionType = { type: 'enableIcons' | 'enableSelectableItems' | 'registerItem'; payload: any; }; type StateType = { isRoot: boolean; hasIcons: boolean; hasSelectableItems: boolean; size: 'xs' | 'sm' | 'md' | 'lg' | null; items: any[]; 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: any[]; requestCloseRoot: (e: Pick, "type">) => void; }; type DispatchFuncProps = { type: ActionType['type']; payload: { ref: RefObject; disabled: boolean; }; }; type MenuContextProps = { state: StateType; dispatch: (props: DispatchFuncProps) => void; }; declare const MenuContext: import("react").Context; export { MenuContext, menuReducer };