/// import { Item } from '../utils/selectableItems'; export declare function canProcessTypeahead(event: React.KeyboardEvent): boolean; declare type GetTypeahedIndexOptions = { /** all items to check against */ items: Item[]; /** the current index (selected/highlighted) in the list (menu/select) if any */ currentIndex?: number; /** the current search buffer in use (ie. "unit" when searching for "United Kingdom") */ searchBuffer?: string; }; /** * In a typeahead scenario (select, menu, …), this functions gets the item index to select next based on: * - all items available * - the currently selected index (if any) * - the current search buffer in use (ie. "unit" when searching for "United Kingdom") * * The behaviour it mimics is as follows: * - when typing the same letter in intervals, cycles through the items starting with this letter * - when typing a few letters in a row, attempt to match an item that starts with that buffer */ export declare function getTypeaheadIndex({ items, currentIndex, searchBuffer, }: GetTypeahedIndexOptions): number | undefined; export {};