import { ChangeDetectorRef, DestroyRef, ElementRef, EventEmitter } from '@angular/core';
import { DataSourceDirective, MatchingStrategy } from '@fundamental-ngx/cdk/data-source';
import { CvaControl, CvaDirective, FormStates, SelectableOptionItem } from '@fundamental-ngx/cdk/forms';
import { Nullable, RangeSelector } from '@fundamental-ngx/cdk/utils';
import { ContentDensityObserver } from '@fundamental-ngx/core/content-density';
import { BehaviorSubject, Subscription } from 'rxjs';
import { FdMultiComboBoxDataSource, FdMultiComboboxAcceptableDataSource } from './data-source/multi-combobox-data-source';
import { MultiComboboxSelectionChangeEvent } from './models/selection-change.event';
import { MultiComboboxConfig } from './multi-combobox-config';
import * as i0 from "@angular/core";
export type TextAlignment = 'left' | 'right';
export declare abstract class BaseMultiCombobox<T = any> {
    abstract selectedItems: T[];
    abstract group: boolean;
    abstract groupKey: string;
    abstract displayKey: string;
    abstract secondaryKey: string;
    abstract showSecondaryText: boolean;
    abstract lookupKey: string;
    abstract invalidEntryMessage: Nullable<string>;
    abstract invalidEntryDisplayTime: number;
    abstract limitless: boolean;
    abstract isGroup: boolean;
    abstract inputText: string;
    abstract searchInputElement: Nullable<ElementRef<HTMLInputElement>>;
    abstract selectionChange: EventEmitter<MultiComboboxSelectionChangeEvent>;
    abstract dataReceived: EventEmitter<boolean>;
    abstract dataRequested: EventEmitter<boolean>;
    /** @hidden */
    readonly cvaControl: CvaControl<T>;
    /** @hidden */
    readonly dataSourceDirective: DataSourceDirective<T, FdMultiComboBoxDataSource<T>>;
    /** Control Value Accessor directive for forms support. */
    readonly _cva: CvaDirective<any>;
    /** Multi combobox config. */
    readonly _multiComboboxConfig: MultiComboboxConfig | null;
    /** Content Density Observer */
    readonly contentDensityObserver: ContentDensityObserver;
    /**
     * @hidden
     * List of selected suggestions
     */
    _selectedSuggestions: SelectableOptionItem<T>[];
    /**
     * @hidden
     * List of matched suggestions
     */
    _suggestions: SelectableOptionItem[];
    /**
     * @hidden
     * Grouped suggestions mapped to array.
     */
    _flatSuggestions: SelectableOptionItem[];
    /** @hidden */
    _fullFlatSuggestions: SelectableOptionItem[];
    /** @hidden */
    selectedShown$: BehaviorSubject<boolean>;
    /** @Hidden */
    protected readonly _elmRef: ElementRef<any>;
    /** @hidden */
    protected readonly _cd: ChangeDetectorRef;
    /** @hidden */
    protected readonly _mapLimit: number;
    /** @Hidden */
    protected readonly _destroyRef: DestroyRef;
    /** @hidden */
    protected _dataSource: FdMultiComboboxAcceptableDataSource<T>;
    /** @hidden */
    protected _inputTextValue: string;
    /** @hidden */
    protected _previousInputText: string;
    /** @hidden */
    protected _matchingStrategy: MatchingStrategy;
    /** @hidden */
    protected _dsSubscription: Subscription | null;
    /** @hidden */
    protected _element: HTMLElement;
    /**
     * @hidden
     * Keys, that won't trigger the popover's open state, when dispatched on search input.
     */
    protected readonly _nonOpeningKeys: number[];
    /** @hidden */
    protected _timerSub$: Subscription;
    /** @hidden */
    protected _previousState?: FormStates;
    /** @hidden */
    protected _previousStateMessage: Nullable<string>;
    /** @hidden */
    protected readonly _rangeSelector: RangeSelector;
    /** @hidden */
    private _dataSourceChanged;
    /** @hidden */
    writeValue(value: T[]): void;
    /**
     * Used to change the value of a control.
     * @param value the value to be applied
     * @param emitOnChange whether to emit "onChange" event.
     * Should be "false", if the change is made programmatically (internally) by the control, "true" otherwise
     */
    setValue(value: T[], emitOnChange?: boolean): void;
    /** @hidden */
    protected _displayFn: (value: T) => string;
    /** @hidden */
    protected _secondaryFn: (value: T) => string;
    /**
     * @hidden
     * Method to emit change event
     */
    protected _emitChangeEvent(): void;
    /** @hidden */
    protected _setSelectedSuggestions(): void;
    /**
     * Convert original data to SelectableOptionItems Interface
     * @hidden
     */
    protected _convertToOptionItems(items: T[]): SelectableOptionItem<T>[];
    /**
     * Convert data to SelectableOptionItems Interface
     * @hidden
     */
    protected _convertObjectsToOptionItems(items: T[]): SelectableOptionItem<T>[];
    /**
     * Convert object[] data to Group OptionItems Interface
     * @hidden
     */
    protected _convertObjectsToGroupOptionItems<K extends T>(items: K[]): SelectableOptionItem<T>[];
    /**
     * Convert T[] data to Secondary SelectableOptionItems<T> Interface
     * @hidden
     */
    protected _convertObjectsToSecondaryOptionItems<K extends T>(items: K[]): SelectableOptionItem<T>[];
    /**
     * Convert Primitive data(Boolean, String, Number) to SelectableOptionItems Interface
     * @hidden
     */
    protected _convertPrimitiveToOptionItems(items: any[]): SelectableOptionItem<T>[];
    /**
     * Convert T[] to SelectableOptionItems<T> Interface (Default)
     * @hidden
     */
    protected _convertObjectsToDefaultOptionItems(items: T[]): SelectableOptionItem<T>[];
    /** @hidden */
    protected _setInvalidEntry(): void;
    /** @hidden */
    protected _unsetInvalidEntry(): void;
    /** @hidden */
    protected _focusToSearchField(): void;
    /** @hidden */
    protected _mapAndUpdateModel(): void;
    /**
     * @hidden
     * Prepares the data stream and subscribes to it.
     */
    protected _openDataStream(matchingStrategy: MatchingStrategy): void;
    /**
     * Parses the data from the data stream and updates the model if needed.
     * @param data array of objects from the data stream.
     */
    protected _parseDataSourceValue(data: T[]): void;
    /**
     * Transforms plain array into `SelectableOptionItem<T>`
     * @param data
     */
    protected _convertDataSourceSuggestions(data: T[]): void;
    /** @hidden */
    protected _processingEmptyData(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<BaseMultiCombobox<any>, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<BaseMultiCombobox<any>, never, never, {}, {}, never, never, true, never>;
}
