import type { MdyOptionNavigationTarget } from "./keys.js"; import { type MdyKeyOrPress } from "../transitions.js"; /** The select's keyboard policy: one place, so three renderers cannot agree on the easy keys only. */ export type MdySelectKeyboardAction = { readonly type: "move"; readonly target: MdyOptionNavigationTarget; } | { readonly type: "open"; } | { readonly type: "select"; readonly optionKey: string; } | { readonly type: "create"; } /** * `restoreFocus` is false when the key that closed the list is also taking focus somewhere else. * Escape returns the user to the trigger; Tab is already on its way to the next control, and * pulling focus back would trap them in the field they just left. */ | { readonly type: "close"; readonly restoreFocus: boolean; }; /** Canonical select keyboard policy. The host only prevents the native event and executes the action. */ export declare function selectKeyboardAction(input: { readonly key: MdyKeyOrPress; readonly open: boolean; readonly searchFocused: boolean; readonly activeKey: string | null; readonly createAvailable: boolean; }): MdySelectKeyboardAction | null;