import type { IElementRef, OnCreate, OnDestroy } from '@melodicdev/core';
import type { Size } from '../../../types/index.js';
import type { AutocompleteOption, AutocompleteSearchFn } from './autocomplete.types.js';
/**
 * ml-autocomplete - Typeahead/autocomplete form component
 *
 * Provides a text input with dropdown suggestions. Supports static option lists
 * or async search via a promise-returning function.
 *
 * @example
 * ```html
 * <ml-autocomplete
 *   label="Search users"
 *   placeholder="Type to search..."
 *   .options=${userOptions}
 * ></ml-autocomplete>
 *
 * <ml-autocomplete
 *   label="Search"
 *   .searchFn=${async (query) => fetch(`/api/search?q=${query}`).then(r => r.json())}
 *   .debounce=${300}
 * ></ml-autocomplete>
 * ```
 *
 * @fires ml:change - Emitted when selection changes
 * @fires ml:search - Emitted when search query changes
 * @fires ml:open - Emitted when dropdown opens
 * @fires ml:close - Emitted when dropdown closes
 */
export declare class AutocompleteComponent implements IElementRef, OnCreate, OnDestroy {
    elementRef: HTMLElement;
    /** Label text */
    label: string;
    /** Placeholder text */
    placeholder: string;
    /** Hint text shown below input */
    hint: string;
    /** Error message (shows error state when set) */
    error: string;
    /** Component size */
    size: Size;
    /** Disable the component */
    disabled: boolean;
    /** Mark as required */
    required: boolean;
    /** Enable multi-select mode */
    multiple: boolean;
    /** Currently selected value (single mode) */
    value: string;
    /** Currently selected values (multi mode) */
    values: string[];
    /** Static options list */
    options: AutocompleteOption[];
    /** Async search function */
    searchFn: AutocompleteSearchFn | null;
    /** Debounce ms for async search */
    debounce: number;
    /** Min chars before searching (0 = show on focus) */
    minChars: number;
    /** Show search icon */
    showIcon: boolean;
    /** Current search query */
    search: string;
    /** Whether dropdown is open */
    isOpen: boolean;
    /** Currently focused option index */
    focusedIndex: number;
    /** Loading state for async search */
    loading: boolean;
    /** Resolved async results */
    asyncOptions: AutocompleteOption[];
    private readonly _handleKeyDown;
    private readonly _handleDocumentClick;
    private _handleScroll;
    private _debounceTimer;
    private _syncingValues;
    onCreate(): void;
    onDestroy(): void;
    onPropertyChange(name: string): void;
    /** Get the selected option (single mode) */
    get selectedOption(): AutocompleteOption | undefined;
    /** Get selected options (multi mode) */
    get selectedOptions(): AutocompleteOption[];
    /** All available options (static or async) */
    get allOptions(): AutocompleteOption[];
    /** Filtered options for display */
    get filteredOptions(): AutocompleteOption[];
    get hasValue(): boolean;
    /** Display text for the input in single mode */
    get displayText(): string;
    /** Open the dropdown */
    open: () => void;
    /** Close the dropdown */
    close: () => void;
    /** Select an option */
    selectOption: (option: AutocompleteOption) => void;
    /** Handle click on option */
    handleOptionClick: (event: Event, option: AutocompleteOption) => void;
    /** Handle input changes */
    handleInput: (event: Event) => void;
    /** Handle input focus */
    handleFocus: () => void;
    /** Handle input click */
    handleInputClick: (event: Event) => void;
    /** Handle tag remove in multi mode */
    handleTagRemove: (event: Event, value: string) => void;
    /** Clear the current value (single mode) */
    handleClear: (event: Event) => void;
    private toggleOption;
    private debouncedSearch;
    private executeSearch;
    /** Close dropdown on clicks outside the component */
    private onDocumentClick;
    private addDocumentClickListener;
    private removeDocumentClickListener;
    private positionDropdown;
    private addScrollListener;
    private removeScrollListener;
    private getDropdownEl;
    private onKeyDown;
    private focusNextOption;
    private focusPreviousOption;
    private findFirstEnabledIndex;
    private updateValues;
    private areValuesEqual;
}
//# sourceMappingURL=autocomplete.component.d.ts.map