import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, QueryList, TemplateRef } from '@angular/core';
import { ActiveDescendantKeyManager } from '@koobiq/cdk/a11y';
import { KbqOptgroup, KbqOption } from '@koobiq/components/core';
import { KbqFormField } from '@koobiq/components/form-field';
import * as i0 from "@angular/core";
export declare class KbqAutocompleteSelectedEvent {
    source: KbqAutocomplete;
    option: KbqOption;
    constructor(source: KbqAutocomplete, option: KbqOption);
}
/** Default `kbq-autocomplete` options that can be overridden. */
export interface KbqAutocompleteDefaultOptions {
    /** Whether the first option should be highlighted when an autocomplete panel is opened. */
    autoActiveFirstOption?: boolean;
}
/** Injection token to be used to override the default options for `kbq-autocomplete`. */
export declare const KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS: InjectionToken<KbqAutocompleteDefaultOptions>;
export declare function KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): KbqAutocompleteDefaultOptions;
export declare class KbqAutocomplete implements AfterContentInit {
    private changeDetectorRef;
    private elementRef;
    private readonly parentFormField;
    private readonly destroyRef;
    /** Unique ID to be used by autocomplete trigger's "aria-owns" property. */
    id: string;
    /** Manages active item in option list based on key events. */
    keyManager: ActiveDescendantKeyManager<KbqOption>;
    /** Whether the autocomplete panel should be visible, depending on option length. */
    showPanel: boolean;
    template: TemplateRef<any>;
    panel: ElementRef;
    options: QueryList<KbqOption>;
    optionGroups: QueryList<KbqOptgroup>;
    /** Function that maps an option's control value to its display value in the trigger. */
    displayWith: ((value: any) => string) | null;
    /**
     * Specify the width of the autocomplete panel.  Can be any CSS sizing value, otherwise it will
     * match the width of its host.
     */
    panelWidth: string | number;
    /** Event that is emitted whenever an option from the list is selected. */
    readonly optionSelected: EventEmitter<KbqAutocompleteSelectedEvent>;
    /** Event that is emitted when the autocomplete panel is opened. */
    readonly opened: EventEmitter<void>;
    /** Event that is emitted when the autocomplete panel is closed. */
    readonly closed: EventEmitter<void>;
    /**
     * Takes classes set on the host kbq-autocomplete element and applies them to the panel
     * inside the overlay container to allow for easy styling.
     */
    get classList(): string;
    set classList(value: string);
    private _classList;
    /**
     * Whether the first option should be highlighted when the autocomplete panel is opened.
     * Can be configured globally through the `KBQ_AUTOCOMPLETE_DEFAULT_OPTIONS` token.
     */
    get autoActiveFirstOption(): boolean;
    set autoActiveFirstOption(value: boolean);
    private _autoActiveFirstOption;
    get isOpen(): boolean;
    set isOpen(value: boolean);
    private _isOpen;
    get openOnFocus(): boolean;
    set openOnFocus(value: boolean);
    private _openOnFocus;
    constructor(changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>, defaults: KbqAutocompleteDefaultOptions, parentFormField: KbqFormField);
    ngAfterContentInit(): void;
    setScrollTop(scrollTop: number): void;
    getScrollTop(): number;
    setVisibility(): void;
    emitSelectEvent(option: KbqOption): void;
    onKeydown(event: KeyboardEvent): any;
    private updateFocusClass;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqAutocomplete, [null, null, null, { optional: true; host: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqAutocomplete, "kbq-autocomplete", ["kbqAutocomplete"], { "displayWith": { "alias": "displayWith"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "autoActiveFirstOption": { "alias": "autoActiveFirstOption"; "required": false; }; "openOnFocus": { "alias": "openOnFocus"; "required": false; }; }, { "optionSelected": "optionSelected"; "opened": "opened"; "closed": "closed"; }, ["options", "optionGroups"], ["*"], false, never>;
}
