import { createLinear } from "makeup-active-descendant";
import typeahead from "makeup-typeahead";
import type { WithNormalizedProps } from "../../global";
export interface ChangeEvent {
    index: number;
    wasClicked: boolean;
    selected: Option["value"][];
    el: HTMLOptionElement;
}
export interface Option extends Omit<Marko.HTML.Option, `on${string}`> {
    disabled?: boolean;
    text?: string;
    description?: Marko.AttrTag<{
        renderBody?: Marko.Body;
    }>;
    icon?: Marko.AttrTag<{
        renderBody?: Marko.Body;
    }>;
}
interface ListboxInput extends Omit<Marko.HTML.Div, `on${string}`> {
    "list-selection"?: "auto" | "manual";
    "typeahead-timeout-length"?: number;
    option?: Marko.AttrTag<Option>;
    name?: string;
    disabled?: boolean;
    "on-change"?: (event: ChangeEvent) => void;
    "on-escape"?: () => void;
}
export interface Input extends WithNormalizedProps<ListboxInput> {
}
interface State {
    selectedIndex: number;
}
declare class Listbox extends Marko.Component<Input, State> {
    wasClicked: boolean;
    _activeDescendant: ReturnType<typeof createLinear>;
    getTypeaheadIndex: ReturnType<typeof typeahead>["getIndex"];
    destroyTypeahead: ReturnType<typeof typeahead>["destroy"];
    get isAutoSelection(): boolean;
    elementScroll(): void;
    handleChange(index: number, wasClicked: boolean): void;
    handleClick(index: number): void;
    handleMouseDown(): void;
    handleKeyDown(originalEvent: KeyboardEvent): void;
    handleListboxChange(event: CustomEvent): void;
    onCreate(): void;
    onInput(input: Input): void;
    onMount(): void;
    onUpdate(): void;
    onRender(): void;
    onDestroy(): void;
    _setupMakeup(): void;
    _cleanupMakeup(): void;
}
export default Listbox;
