import { KeyboardEvent, RefObject } from 'react'; import { VirtualListRef } from '../VirtualList/types'; import { SelectListV2FocusTarget } from './utils'; export type UseSelectListNavigationOptions = { targets: SelectListV2FocusTarget[]; /** Present only while virtualized; lets far jumps scroll a row into existence. */ virtualListRef?: RefObject; /** * Receives printable keys typed while a row has focus, mirroring how the * dropdown menus redirect typing into their search input. Omit when the * list has no search. */ onTypeahead?: (key: string) => void; }; /** * Roving-tabindex navigation over an always-visible option list. * * Only the active row is a tab stop, so tabbing past a 5000-row list costs one * stop. Arrow/Home/End move focus and skip disabled rows; Enter and Space are * left to `SelectItemV2`, which already toggles and calls `preventDefault`. */ export declare const useSelectListNavigation: ({ targets, virtualListRef, onTypeahead, }: UseSelectListNavigationOptions) => { activeItemIndex: number; getItemRef: (itemIndex: number, value: string) => (node: HTMLElement | null) => void; handleKeyDown: (e: KeyboardEvent) => void; focusFirstItem: () => void; };