/// <reference types="svelte" />
import { type InteractOutsideEvent } from '../../internal/actions/index.js';
import type { MeltActionReturn } from '../../internal/types.js';
import { type Readable } from 'svelte/store';
import type { ListboxEvents } from './events.js';
import type { CreateListboxProps, ListboxOption, ListboxOptionProps, ListboxSelected } from './types.js';
export declare const INTERACTION_KEYS: string[];
export declare const listboxIdParts: readonly ["trigger", "menu", "label"];
export type ListboxIdParts = typeof listboxIdParts;
/**
 * Creates an ARIA-1.2-compliant listbox.
 *
 * @TODO multi-select using `tags-input` builder?
 */
export declare function createListbox<Value, Multiple extends boolean = false, S extends ListboxSelected<Multiple, Value> = ListboxSelected<Multiple, Value>>(props?: CreateListboxProps<Value, Multiple, S>): {
    ids: import("../../internal/helpers/index.js").ToWritableStores<{
        label: string;
        menu: string;
        trigger: string;
    }>;
    elements: {
        trigger: import("../../internal/helpers/index.js").MeltElement<[{
            update: (updater: import("svelte/store").Updater<boolean>, sideEffect?: ((newValue: boolean) => void) | undefined) => void;
            set: (this: void, value: boolean) => void;
            subscribe(this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined): import("svelte/store").Unsubscriber;
            get: () => boolean;
            destroy?: (() => void) | undefined;
        }, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<HTMLElement | null>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<boolean>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<string>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<string>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<string>>], (node: HTMLElement) => MeltActionReturn<ListboxEvents['trigger']>, ([$open, $highlightedItem, $disabled, $menuId, $triggerId, $labelId]: [boolean, HTMLElement | null, boolean, string, string, string]) => {
            readonly 'aria-activedescendant': string | undefined;
            readonly 'aria-autocomplete': "list";
            readonly 'aria-controls': string;
            readonly 'aria-expanded': boolean;
            readonly 'aria-labelledby': string;
            readonly 'data-state': "open" | "closed";
            readonly id: string;
            readonly role: "combobox";
            readonly disabled: true | undefined;
            readonly type: "button" | undefined;
        }, string>;
        group: import("../../internal/helpers/index.js").MeltElement<import("svelte/store").Stores | undefined, import("svelte/action").Action<any, any, Record<never, any>>, () => (groupId: string) => {
            readonly role: "group";
            readonly 'aria-labelledby': string;
        }, string>;
        option: import("../../internal/helpers/index.js").MeltElement<[Readable<(value: Value) => boolean>], (node: HTMLElement) => MeltActionReturn<ListboxEvents['item']>, ([$isSelected]: [(value: Value) => boolean]) => (props: ListboxOptionProps<Value>) => {
            readonly 'data-value': string;
            readonly 'data-label': string | undefined;
            readonly 'data-disabled': true | undefined;
            readonly 'aria-disabled': true | undefined;
            readonly 'aria-selected': boolean;
            readonly 'data-selected': "" | undefined;
            readonly id: string;
            readonly role: "option";
        }, string>;
        menu: import("../../internal/helpers/index.js").MeltElement<[Readable<boolean>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<string>>], (node: HTMLElement) => MeltActionReturn<ListboxEvents['menu']>, ([$isVisible, $menuId]: [boolean, string]) => {
            readonly hidden: true | undefined;
            readonly id: string;
            readonly role: "listbox";
            readonly style: string | undefined;
        }, string>;
        groupLabel: import("../../internal/helpers/index.js").MeltElement<import("svelte/store").Stores | undefined, import("svelte/action").Action<any, any, Record<never, any>>, () => (groupId: string) => {
            readonly id: string;
        }, string>;
        label: import("../../internal/helpers/index.js").MeltElement<[import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<string>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<string>>], (node: HTMLElement) => MeltActionReturn<"mousedown">, ([$labelId, $triggerId]: [string, string]) => {
            readonly id: string;
            readonly for: string;
        }, string>;
        hiddenInput: import("../../internal/helpers/index.js").MeltElement<[import("../../internal/helpers/index.js").WithGet<Readable<string>>, import("svelte/motion").Readable<string | undefined>, import("../../internal/helpers/index.js").WithGet<Readable<boolean>>, import("../../internal/helpers/index.js").WithGet<Readable<boolean>>, import("../../internal/helpers/index.js").WithGet<Readable<import("svelte/elements.js").HTMLInputTypeAttribute | null | undefined>>, import("../../internal/helpers/index.js").WithGet<Readable<boolean | undefined>>], (node: HTMLInputElement) => {
            destroy: () => void;
        }, ([$value, $name, $disabled, $required, $type, $checked]: [string, string | undefined, boolean, boolean, import("svelte/elements.js").HTMLInputTypeAttribute | null | undefined, boolean | undefined]) => {
            readonly name: string | undefined;
            readonly value: string;
            readonly 'aria-hidden': "true";
            readonly hidden: true;
            readonly disabled: boolean;
            readonly required: boolean;
            readonly tabIndex: -1;
            readonly type: import("svelte/elements.js").HTMLInputTypeAttribute | null | undefined;
            readonly checked: boolean | undefined;
            readonly style: string;
        }, string>;
        arrow: import("../../internal/helpers/index.js").MeltElement<import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<number | undefined>>, import("svelte/action").Action<any, any, Record<never, any>>, ($arrowSize: number | undefined) => {
            readonly 'data-arrow': true;
            readonly style: string;
        }, string>;
    };
    states: {
        open: {
            update: (updater: import("svelte/store").Updater<boolean>, sideEffect?: ((newValue: boolean) => void) | undefined) => void;
            set: (this: void, value: boolean) => void;
            subscribe(this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined): import("svelte/store").Unsubscriber;
            get: () => boolean;
            destroy?: (() => void) | undefined;
        };
        selected: {
            update: (updater: import("svelte/store").Updater<S | undefined>, sideEffect?: ((newValue: S | undefined) => void) | undefined) => void;
            set: (this: void, value: S | undefined) => void;
            subscribe(this: void, run: import("svelte/store").Subscriber<S | undefined>, invalidate?: import("svelte/store").Invalidator<S | undefined> | undefined): import("svelte/store").Unsubscriber;
            get: () => S | undefined;
            destroy?: (() => void) | undefined;
        };
        highlighted: Readable<ListboxOption<Value> | undefined>;
        highlightedItem: import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<HTMLElement | null>>;
    };
    helpers: {
        isSelected: Readable<(value: Value) => boolean>;
        isHighlighted: Readable<(item: Value) => boolean>;
        closeMenu: () => void;
    };
    options: import("../../internal/helpers/index.js").ToWritableStores<{
        multiple: Multiple;
        disabled: boolean;
        forceVisible: boolean;
        name: string | undefined;
        portal: string | HTMLElement | null;
        required: boolean;
        onOpenChange?: import("../../internal/helpers/index.js").ChangeFn<boolean> | undefined;
        positioning: import("../../internal/actions/index.js").FloatingConfig | {
            placement: "bottom";
            sameWidth: true;
        };
        arrowSize?: number | undefined;
        scrollAlignment: "center" | "nearest";
        loop: boolean;
        defaultSelected?: S | undefined;
        selected?: import("svelte/store").Writable<S> | undefined;
        onSelectedChange?: import("../../internal/helpers/index.js").ChangeFn<S | undefined> | undefined;
        closeOnOutsideClick: boolean;
        escapeBehavior: import("../../internal/actions/index.js").EscapeBehaviorType;
        onOutsideClick: ((event: InteractOutsideEvent) => void) | undefined;
        preventScroll: boolean;
        preventTextSelectionOverflow: boolean;
        typeahead: boolean;
        highlightOnHover: boolean;
        rootElement: ParentNode | undefined;
    }>;
};
