import { type KeyboardEventHandler } from 'react'; import { type MultipleSelectBoxOption, type AllowedValueTypes } from '../MultipleSelectBox.types'; type UseOptionKeyboardNavigationProps = Record> = { /** * Filtered options (after search and other filters). */ filteredOptions: MultipleSelectBoxOption[]; /** * Currently selected values. */ selectedValues: Set['value']>; /** * Callback when an option is selected. */ onSelectOption: (option: MultipleSelectBoxOption) => void; /** * Callback to close the option panel. */ onClosePanel: () => void; }; /** * Hook to manage keyboard navigation and interaction for options in MultipleSelectBox * * This hook handles: * - Tracking which option should be tabbable * - Arrow key navigation between options * - Enter/Space key selection * - Escape key to close panel * - Focus management * * @returns Object with handlers and state for option keyboard navigation */ export declare function useOptionKeyboardNavigation = Record>({ filteredOptions, selectedValues, onSelectOption, onClosePanel, }: UseOptionKeyboardNavigationProps): { tabbableOptionIndex: number; handleOptionFocus: (optionIndex: number) => void; createKeyDownHandler: (option: MultipleSelectBoxOption) => KeyboardEventHandler; }; export {};