import { ChangeDetectorRef, ElementRef, EventEmitter, Injector, OnChanges, OnDestroy, OnInit } from '@angular/core';
import { AbstractControl, ControlContainer, ControlValueAccessor, ValidationErrors } from '@angular/forms';
import { TranslateService } from '@ngx-translate/core';
import { QdFocusable } from '../../core/focusable/focusable';
import { QdFormDropdownConfiguration, QdFormOption } from '../model/forms.interface';
import { QdFormsActionEmitterService } from '../shared/services/action-emitter.service';
import { QdEventBrokerService } from '../../core/services/event-broker.service';
import { QdFormOptionsResolverRegistry } from '../shared/services/options-resolver.registry';
import { QdFormOptionsService } from '../shared/services/form-options.service';
import { QdDropdownOptionsComponent } from './options/dropdown-options.component';
import { QdPopoverOnClickDirective } from '../../core/popover/popover-on-click/popover-on-click.directive';
import { ConnectedPosition } from '@angular/cdk/overlay';
import * as i0 from "@angular/core";
/**
 * The **QdDropdown** is an component that provides a dropdown form element.<br />
 * It can be used with Quadrel Reactive Forms or with model binding.
 *
 * ####**Usage with Reactive Forms**
 *
 * ```ts
 * form = new QdFormGroup({
 *   dropdown: new QdFormControl()
 * });
 * ```
 * ```html
 * <form [formGroup]="form">
 *   <qd-dropdown [formControlName]="dropdown" [config]="config"></qd-dropdown>
 * </form>
 * ```
 *
 * ####**Usage with Model Binding**
 * ```ts
 * value;
 * ```
 * ```html
 * <qd-dropdown [(value)]="value" [config]="config"></qd-dropdown>
 * ```
 */
export declare class QdDropdownComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy, QdFocusable {
    private readonly translateService;
    private readonly changeDetectorRef;
    private readonly actionEmitterService;
    private readonly resolverRegistry;
    private readonly optionsService;
    private readonly injector;
    private readonly controlContainer;
    private readonly eventBrokerService;
    /**
     * The current form item value, if you are working with Model Binding.
     *
     * @example
     * <qd-dropdown [(value)]="dropdownValue" [config]="config"></qd-dropdown>
     */
    set value(value: string | null);
    /**
     * Current selected value
     */
    get value(): string | null;
    /**
     * Identifier to distinguish click events on same options in different dropdowns.
     * If not given a random id is generated automatically.
     */
    id: any;
    /**
     * The form control name can be assigned here if you want to use Reactive Forms.
     */
    formControlName: string;
    /**
     * Configuration object
     *
     * @example
     * {
     *   "label": {
     *     "i18n": "Dropdown"
     *   },
     *   "hint": {
     *     "i18n": "Helpertext"
     *   },
     *   "filter": false,
     *   "disabled": false,
     *   "readonly": false,
     *   "viewonly": false,
     *   "options": [
     *     {
     *       "i18n": "i18n.import",
     *       "value": "import"
     *     },
     *     {
     *       "i18n": "i18n.export",
     *       "value": "export"
     *     },
     *     {
     *       "i18n": "i18n.transit",
     *       "value": "transit",
     *       "disabled": true
     *     }
     *   ]
     * }
     */
    config: QdFormDropdownConfiguration;
    /**
     * A static test ID for integration tests can be set. <br />
     * The value for the HTML attribute [data-test-id].
     */
    testId: string;
    /**
     * TODO [REMOVE]: The property below is API-relevant and **must not** be used to solve styling issues. Remove this workaround once proper styling solutions are in place.
     */
    qdPopoverMaxHeight: number;
    /**
     * Emits event when the value has changed. Return value matches the current value.
     */
    readonly valueChange: EventEmitter<string>;
    /**
     * Emits event when the value has changed. Note: Emits on keyup.
     */
    readonly enterClick: EventEmitter<any>;
    /**
     * Emits event when the hint is clicked/tapped. `hintAction` must be set to `true` for this.
     */
    readonly clickHint: EventEmitter<any>;
    /**
     * Emits event when the readonly value is clicked/tapped. `clickReadonly ` must be set to `true` for this.
     */
    readonly clickReadonly: EventEmitter<any>;
    /**
     * Emits event when the viewonly value is clicked/tapped. `clickViewonly ` must be set to `true` for this.
     */
    readonly clickViewonly: EventEmitter<any>;
    readonly: boolean;
    readonlyAction: boolean;
    viewonly: boolean;
    viewonlyAction: boolean;
    hintAction: boolean;
    disabled: boolean;
    dense: boolean;
    label: string;
    filter: boolean;
    options: QdFormOption[];
    filterText: '';
    control: AbstractControl;
    positionStrategy: ConnectedPosition[];
    private _value;
    private _selectedOption;
    private _subs;
    private _onChange;
    private _onTouch;
    dropdownOptions: QdDropdownOptionsComponent;
    dropdownDirective: QdPopoverOnClickDirective;
    box: ElementRef;
    isOpen: boolean;
    get hasError(): boolean;
    get selectedOption(): QdFormOption | null;
    get hasHint(): boolean;
    get isSelected(): boolean;
    get errors(): ValidationErrors;
    get selected(): string;
    get required(): boolean;
    get placeholderPrefix(): string;
    get placeholder(): string;
    constructor(translateService: TranslateService, changeDetectorRef: ChangeDetectorRef, actionEmitterService: QdFormsActionEmitterService, resolverRegistry: QdFormOptionsResolverRegistry, optionsService: QdFormOptionsService, injector: Injector, controlContainer: ControlContainer, eventBrokerService: QdEventBrokerService, isPopoverTopFirst: boolean);
    ngOnInit(): void;
    ngOnChanges(changes: any): void;
    ngOnDestroy(): void;
    focus(): void;
    registerOnChange(fn: (_: any) => void): void;
    registerOnTouched(fn: any): void;
    writeValue(value: any): void;
    setDisabledState(disabled: boolean): void;
    hasOptions(): boolean;
    handleOptionSelected(option: QdFormOption): void;
    handleClick(option: QdFormOption): void;
    handleFilterChange($event: any): void;
    onOpenDropdown(): void;
    onDropdownClosed(): void;
    private getPositionStrategy;
    private loadOptionsForCurrentConfig;
    private resolveControl;
    private updateConfiguration;
    private haveOptionsChanged;
    private handleOptionsChange;
    private updateSelectedOption;
    private initOpModeSubscription;
    static ɵfac: i0.ɵɵFactoryDeclaration<QdDropdownComponent, [null, null, null, null, null, null, { optional: true; host: true; skipSelf: true; }, { optional: true; }, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<QdDropdownComponent, "qd-dropdown", never, { "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "config": { "alias": "config"; "required": false; }; "testId": { "alias": "data-test-id"; "required": false; }; "qdPopoverMaxHeight": { "alias": "qdPopoverMaxHeight"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; }, { "valueChange": "valueChange"; "enterClick": "enterClick"; "clickHint": "clickHint"; "clickReadonly": "clickReadonly"; "clickViewonly": "clickViewonly"; }, never, never, false, never>;
}
//# sourceMappingURL=dropdown.component.d.ts.map