import { TypeaheadState } from './typeahead.ts'; import { Context, ListboxState, ListboxUIState } from './state.ts'; import { Selection } from './selection.ts'; export type ActionCommand = { type: 'action'; targetIndex: number; selection: Selection; }; export type TypeaheadCommand = { type: 'typeahead'; typeahead: TypeaheadState; selection: Selection; }; export type Command = ActionCommand | TypeaheadCommand; export declare function commandFromKey(state: ListboxState, ctx: Context, e: KeyboardEvent, now: number): Command | null; export declare function commandFromClick(_state: ListboxUIState, ctx: Context, e: MouseEvent, targetIndex: number): Command; export declare function apply(state: ListboxUIState, context: Context, command: Command): ListboxUIState;