import { OnInit, OnDestroy, OnChanges, SimpleChanges, AfterViewInit, TemplateRef, ElementRef, EventEmitter, QueryList, DoCheck } from '@angular/core';
import { ControlValueAccessor, FormControl } from '@angular/forms';
import { BehaviorSubject } from 'rxjs';
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
import { EuiChipDragDrop } from '@eui/components/eui-chip-list';
import { EuiChip } from '@eui/components/eui-chip';
import { EuiTemplateDirective } from '@eui/components/directives';
import { EuiAutoCompleteItem } from './models/eui-autocomplete-item.model';
import * as i0 from "@angular/core";
import * as i1 from "@eui/components/shared";
/**
 * @description
 * `eui-autocomplete` is a text input showing some suggestions when the user types letters. It can be enhanced with chips to allow user to select multiple values.
 *
 */
export declare class EuiAutocompleteComponent implements OnInit, OnDestroy, ControlValueAccessor, OnChanges, AfterViewInit, DoCheck {
    /**
     * @description
     * Computes and returns the CSS classes for the component based on its current state.
     *
     * @returns {string} Space-separated string of CSS class names
     */
    get cssClasses(): string;
    /**
     * Sets the id on the text input.
     */
    inputId: string;
    /**
     * Datas to be used in the autocomplete.
     */
    autocompleteData: EuiAutoCompleteItem[];
    /**
     * Sets the maximum number of options that will be visible in the autocomplete panel.
     *
     * @default 5
     */
    visibleOptions: number;
    /**
     * Sets the way the options should be retrieved.
     *
     * @default 'contains'
     */
    matching: 'startWith' | 'contains';
    /**
     * Sets the placeholder of the text input.
     */
    placeholder: string;
    /**
     * Sets the options that will be selected by default.
     */
    autocompleteDataSelected: EuiAutoCompleteItem[];
    /**
     * Sets the sort criteria of the chips.
     *
     * @type {('ASC' | 'DESC')}
     * @default 'ASC'
     */
    chipsSortOrder: 'ASC' | 'DESC';
    /**
     * In combination with `isChipsSorted`. Sets the sort criteria of the options in the panel.
     *
     * @type {('ASC' | 'DESC')}
     * @default 'ASC'
     */
    itemsSortOrder: 'ASC' | 'DESC';
    /**
     * In Combination with `isItemsSorted`. Sets the position of the chips relative to the text input.
     *
     * @type {('top' | 'bottom' | 'inside')}
     * @default 'top''
     */
    chipsPosition: 'top' | 'bottom' | 'inside';
    /**
     * Sets a grouping among the options.
     */
    groupBy: string;
    /**
     * In combination with `maxVisibleChipsCount`, sets the label of the 'more label' button, if not provided an arrow right icon will be displayed only.
     */
    toggleLinkMoreLabel: string;
    /**
     * In combination with `maxVisibleChipsCount`, sets the label of the 'less label' button, if not provided an arrow left icon will be displayed only.
     */
    toggleLinkLessLabel: string;
    /**
     * Sets a CSS class to be added on the options panel container.
     */
    classList: string;
    /**
     * Sets the width of the options panel.
     *
     * @type {(string | number)}
     */
    panelWidth: string | number;
    /**
     * In combination with `isChipsDragAndDrop`, sets the name to the chips source.
     */
    dragAndDropSourceName: string;
    /**
     * In combination with `isChipsDragAndDrop`, sets the name to the chips source with which a drag and drop will be done.
     */
    dragAndDropConnectedTo: string[];
    /**
     * In combination with `hasChips`. Whether the user can add a value, which is not part of the options, to craete a chip.
     *
     * @default true
     */
    isFreeValueAllowed: boolean;
    /**
     * Whether autocomplete is in readonly mode.
     *
     * @default false
     */
    isReadonly: boolean;
    /**
     * Whether loading spinner is displayed in text input.
     *
     * @default false
     */
    isLoading: boolean;
    /**
     * Whether autocomplete will display the selected values with chips.
     *
     * @default false
     */
    hasChips: boolean;
    /**
     * Whether autocomplete will get the data asynchronously.
     *
     * @default false
     */
    isAsync: boolean;
    /**
     * Whether this chip is sorted on their label.
     *
     * @default false
     */
    isChipsSorted: boolean;
    /**
     * Whether this item in the panel is sorted on their label.
     *
     * @default false
     */
    isItemsSorted: boolean;
    /**
     * Whether the chip can be removed from the selection.
     * When a chip is removed, its value goes back in the panel.
     *
     * @default true
     */
    isChipsRemovable: boolean;
    /**
     * Whether the chips can have multiple times the same value.
     * With this option, the value is not removed from the panel when choosen.
     *
     * @default false
     */
    isDuplicateValueAllowed: boolean;
    /**
     * In combination with `hasChips`. Whether the chip is added when the text input is blurred.
     *
     * @default false
     */
    isAddOnBlur: boolean;
    /**
     * In combination with `hasChips` and `isFreeValueAllowed=false`. Whether the text input is empty after blurring when no value has been selected in the panel.
     *
     * @default false
     */
    isForceSelection: boolean;
    /**
     * Whether a limited amount, defined by this option, is used to display the chips.
     */
    maxVisibleChipsCount: any;
    /**
     * Whether the chips label length is limited by the value of this option.
     */
    chipsLabelTruncateCount: any;
    /**
     * In combination with `maxVisibleChipsCount`. Whether all chips are shown by default.
     *
     * @default false
     */
    isMaxVisibleChipsOpened: boolean;
    /**
     * Whether the chips can be drag and dropped.
     *
     * @default false
     */
    isChipsDragAndDrop: boolean;
    autocompleteOptions: BehaviorSubject<EuiAutoCompleteItem<any>[]>;
    selectedOptionIndex: number;
    autocompleteControl: FormControl<string>;
    isDisabled: boolean;
    chips: EuiChip[];
    distinctOptionGroups: string[];
    groupedOptions: BehaviorSubject<{
        [id: string]: {
            options: EuiAutoCompleteItem[];
            ancestorLength: number;
        };
    }>;
    globalOptionIndex: number;
    itemSize: number;
    autocompleteOptionTemplate: TemplateRef<{
        $implicit: EuiAutoCompleteItem;
    }>;
    autocompleteOptGroupTemplate: TemplateRef<{
        $implicit: {
            label: string;
        };
    }>;
    templates: QueryList<EuiTemplateDirective>;
    templatePortalContent: TemplateRef<ElementRef>;
    inputContainerRef: ElementRef;
    virtualScrolling: CdkVirtualScrollViewport;
    input: ElementRef;
    /**
     * Event emitted when the panel is closed.
     */
    panelClose: EventEmitter<any>;
    /**
     * Event emitted when the panel is opened.
     */
    panelOpen: EventEmitter<any>;
    /**
     * Event emitted when the text input gets the focus.
     */
    inputFocus: EventEmitter<any>;
    /**
     * Event emitted when the text input is blurred.
     */
    inputBlur: EventEmitter<any>;
    /**
     * Event emitted when the text input is cleared.
     */
    clear: EventEmitter<any>;
    /**
     * Event emitted when an option is selected or when the selection is modified.
     */
    selectionChange: EventEmitter<EuiAutoCompleteItem<any>[]>;
    /**
     * Event emitted when an option is selected.
     */
    itemAdd: EventEmitter<EuiAutoCompleteItem<any>>;
    /**
     * Event emitted when an option is removed.
     */
    itemRemove: EventEmitter<EuiAutoCompleteItem<any>>;
    /**
     * Event emitted when the value of the text input changes.
     */
    inputChange: EventEmitter<string>;
    /**
     * Event emitted when a chip drag starts.
     */
    chipDragStart: EventEmitter<EuiChipDragDrop>;
    /**
     * Event emitted when a chip drag is released.
     */
    chipDragRelease: EventEmitter<EuiChipDragDrop>;
    /**
     * Event emitted when a chip is dropped.
     */
    chipDrop: EventEmitter<EuiChipDragDrop>;
    protected hasAriaRequiredAttribute: boolean;
    private destroy$;
    private overlayRef;
    private isOpen$;
    private templatePortal;
    private keyboardOptionSelectorHandlerSubscription;
    private addOnBlurClickHandlerSubscription;
    private isForceSelectionSubscription;
    private keyboardSubscription;
    private autocompleteOptionsSubscription;
    private scrollDispatcherSubscription;
    private windowResizeSubscription;
    private value;
    private TOP;
    private BOTTOM;
    private preferredPositons;
    private overlay;
    private cd;
    private viewContainerRef;
    private elementRef;
    private liveAnnouncer;
    private scrollDispatcher;
    private euiAppShellService;
    private baseStatesDirective;
    private control;
    private platformId;
    constructor();
    get isChipsPositionInside(): boolean;
    ngOnChanges(c: SimpleChanges): void;
    ngOnInit(): void;
    ngDoCheck(): void;
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    /**
     * Calculates the height that the virtual scroll need to have.
     *
     * @type {number}
     */
    get cdkVirtualScrollViewport(): number;
    /**
     * Returns the opening state of the panel.
     *
     * @type {boolean}
     */
    get isOpen(): boolean;
    /**
     * Checks if autocomplete options are available.
     *
     * @returns {boolean} `true` if options are present, otherwise `false`.
     */
    get hasOptionsResult(): boolean;
    /**
     * Method that creates and opens the panel containing autocomplete options.
     */
    openPanel(): void;
    /**
     * Closes the autocomplete panel.
     */
    closePanel(): void;
    /**
     * Method called when an option is selected.
     *
     * @param e Selected option
     */
    onOptionSelected(e: EuiAutoCompleteItem): void;
    /**
     * Method called when an option is added through the text input.
     *
     * @param value Value to add
     */
    add(value: string): void;
    optionsTrackByFn(index: number, item: EuiAutoCompleteItem): string | number;
    writeValue(value: EuiAutoCompleteItem | EuiAutoCompleteItem[]): void;
    setDisabledState(isDisabled: boolean): void;
    registerOnChange(fn: () => void): void;
    registerOnTouched(fn: () => void): void;
    onClear(): void;
    /**
     * Text input focus handler.
     */
    onFocus(): void;
    /**
     * Text input blur handler.
     */
    onBlur(): void;
    /**
     * Called when a chip is removed.
     *
     * @param e Object containing the chip to remove.
     */
    onChipRemove(e: {
        chips: EuiChip[];
        removed: EuiChip | {
            chip: EuiChip;
            event: Event;
        };
    }): void;
    /**
     * Called when a chip is dropped for reordering or from a source to another.
     *
     * @param e Object containing the chip dropped.
     */
    onChipDropped(e: EuiChipDragDrop): void;
    /**
     * Called when a chip is dragged for reordering or from a source to another.
     *
     * @param e Object containing the chip dragged.
     */
    onChipDragStarted(e: EuiChipDragDrop): void;
    /**
     * Called when a chip is released for reordering or from a source to another.
     *
     * @param e Object containing the chip released.
     */
    onChipDragReleased(e: EuiChipDragDrop): void;
    /**
     * Calculates the item size for virtual scrolling.
     *
     * @returns a number representing the item size.
     */
    private getItemSize;
    /**
     * Re-order options panel based on the input valuea and sort order.
     *
     * @param value Value to filter the options.
     * @param isItemsSorted If the items are sorted.
     */
    private setOptions;
    /**
     * Return the position strategy for the panel.
     *
     * @returns A CDK position strategy.
     */
    private getPositionStrategy;
    /**
     * Return the scroll strategy for the panel.
     *
     * @returns A CDK scroll strategy.
     */
    private getScrollStrategy;
    /**
     * Refine the options based on the input value.
     *
     * @param inputValue Value to filter the options.
     * @returns An array of options.
     */
    private filterOptions;
    /**
     * Converts EuiAutoCompleteItem array to EuiChip array.
     *
     * @param items Array of EuiAutoCompleteItem.
     * @returns An array of EuiChip
     */
    private mapToChip;
    /**
     * Sort an array of objects based on their label.
     *
     * @param tab Array to order
     * @param sortOrder Sort order criteria
     * @returns A sorted array
     */
    private orderArray;
    /**
     * Transforms array of EuiAutoCompleteItem into a grouped object.
     *
     * @param options Array of EuiAutoCompleteItem
     * @param groupBy Label of the group
     * @returns An object containing the grouped options and the distinct option groups.
     */
    private groupingHandler;
    /**
     * Indicates if the origin element is visible in the scrollable parent.
     *
     * @param origin Origin of the autocomplete
     * @param scrollableParent Scrollable container
     * @returns A boolean, true if visible else false.
     */
    private isVisible;
    private onChange;
    private onTouch;
    /**
     * Updates the `aria-required` attribute on the input element.
     * @private
     */
    private updateInputAriaRequiredAttribute;
    static ɵfac: i0.ɵɵFactoryDeclaration<EuiAutocompleteComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<EuiAutocompleteComponent, "eui-autocomplete, input[euiAutocomplete]", never, { "inputId": { "alias": "inputId"; "required": false; }; "autocompleteData": { "alias": "autocompleteData"; "required": false; }; "visibleOptions": { "alias": "visibleOptions"; "required": false; }; "matching": { "alias": "matching"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "autocompleteDataSelected": { "alias": "autocompleteDataSelected"; "required": false; }; "chipsSortOrder": { "alias": "chipsSortOrder"; "required": false; }; "itemsSortOrder": { "alias": "itemsSortOrder"; "required": false; }; "chipsPosition": { "alias": "chipsPosition"; "required": false; }; "groupBy": { "alias": "groupBy"; "required": false; }; "toggleLinkMoreLabel": { "alias": "toggleLinkMoreLabel"; "required": false; }; "toggleLinkLessLabel": { "alias": "toggleLinkLessLabel"; "required": false; }; "classList": { "alias": "classList"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "dragAndDropSourceName": { "alias": "dragAndDropSourceName"; "required": false; }; "dragAndDropConnectedTo": { "alias": "dragAndDropConnectedTo"; "required": false; }; "isFreeValueAllowed": { "alias": "isFreeValueAllowed"; "required": false; }; "isReadonly": { "alias": "isReadonly"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "hasChips": { "alias": "hasChips"; "required": false; }; "isAsync": { "alias": "isAsync"; "required": false; }; "isChipsSorted": { "alias": "isChipsSorted"; "required": false; }; "isItemsSorted": { "alias": "isItemsSorted"; "required": false; }; "isChipsRemovable": { "alias": "isChipsRemovable"; "required": false; }; "isDuplicateValueAllowed": { "alias": "isDuplicateValueAllowed"; "required": false; }; "isAddOnBlur": { "alias": "isAddOnBlur"; "required": false; }; "isForceSelection": { "alias": "isForceSelection"; "required": false; }; "maxVisibleChipsCount": { "alias": "maxVisibleChipsCount"; "required": false; }; "chipsLabelTruncateCount": { "alias": "chipsLabelTruncateCount"; "required": false; }; "isMaxVisibleChipsOpened": { "alias": "isMaxVisibleChipsOpened"; "required": false; }; "isChipsDragAndDrop": { "alias": "isChipsDragAndDrop"; "required": false; }; }, { "panelClose": "panelClose"; "panelOpen": "panelOpen"; "inputFocus": "inputFocus"; "inputBlur": "inputBlur"; "clear": "clear"; "selectionChange": "selectionChange"; "itemAdd": "itemAdd"; "itemRemove": "itemRemove"; "inputChange": "inputChange"; "chipDragStart": "chipDragStart"; "chipDragRelease": "chipDragRelease"; "chipDrop": "chipDrop"; }, ["templates"], never, true, [{ directive: typeof i1.BaseStatesDirective; inputs: { "euiSecondary": "euiSecondary"; "euiSuccess": "euiSuccess"; "euiInfo": "euiInfo"; "euiWarning": "euiWarning"; "euiDanger": "euiDanger"; "euiAccent": "euiAccent"; }; outputs: {}; }]>;
    static ngAcceptInputType_isFreeValueAllowed: unknown;
    static ngAcceptInputType_isReadonly: unknown;
    static ngAcceptInputType_isLoading: unknown;
    static ngAcceptInputType_hasChips: unknown;
    static ngAcceptInputType_isAsync: unknown;
    static ngAcceptInputType_isChipsSorted: unknown;
    static ngAcceptInputType_isItemsSorted: unknown;
    static ngAcceptInputType_isChipsRemovable: unknown;
    static ngAcceptInputType_isDuplicateValueAllowed: unknown;
    static ngAcceptInputType_isAddOnBlur: unknown;
    static ngAcceptInputType_isForceSelection: unknown;
    static ngAcceptInputType_maxVisibleChipsCount: unknown;
    static ngAcceptInputType_chipsLabelTruncateCount: unknown;
    static ngAcceptInputType_isMaxVisibleChipsOpened: unknown;
    static ngAcceptInputType_isChipsDragAndDrop: unknown;
}
//# sourceMappingURL=eui-autocomplete.component.d.ts.map