import { EventEmitter, OnInit } from '@angular/core';
import { FormControl, UntypedFormControl } from '@angular/forms';
import { KbqButtonStyles } from '@koobiq/components/button';
import { KbqComponentColors, PopUpPlacements, PopUpSizes } from '@koobiq/components/core';
import { Observable } from 'rxjs';
import { KbqFilterBar } from './filter-bar';
import { KbqFilter, KbqSaveFilterError, KbqSaveFilterEvent } from './filter-bar.types';
import * as i0 from "@angular/core";
export declare class KbqFilters implements OnInit {
    /** @docs-private */
    protected readonly placements: typeof PopUpPlacements;
    /** @docs-private */
    protected readonly styles: typeof KbqButtonStyles;
    /** @docs-private */
    protected readonly colors: typeof KbqComponentColors;
    /** KbqFilterBar instance */
    protected readonly filterBar: KbqFilterBar;
    /** @docs-private */
    private readonly changeDetectorRef;
    private button;
    private popover;
    private dropdown;
    private search;
    private newFilterName;
    private saveFilterButton;
    /** control for search filter */
    searchControl: UntypedFormControl;
    /** filtered by search filters */
    filteredOptions: Observable<KbqFilter[]>;
    /** @docs-private */
    popoverSize: PopUpSizes;
    /** new filter name for saving */
    filterName: FormControl<string | null>;
    /** true if saving a new filter, false if saving changes in filter */
    saveNewFilter: boolean;
    showFilterSavingError: boolean;
    filterSavingErrorText: string;
    isSaving: boolean;
    filters: KbqFilter[];
    /** Event that is generated whenever the user selects a filter. */
    readonly onSelectFilter: EventEmitter<KbqFilter>;
    /** Event that is generated whenever the user save a filter. */
    readonly onSave: EventEmitter<KbqSaveFilterEvent>;
    /** Event that is generated whenever the user change a filter. */
    readonly onChangeFilter: EventEmitter<KbqSaveFilterEvent>;
    /** Event that is generated whenever the user saves a filter as new.
     * @deprecated use onSave with status = newFilter. */
    readonly onSaveAsNew: EventEmitter<KbqSaveFilterEvent>;
    /** Event that is generated whenever the user remove a filter. */
    readonly onRemoveFilter: EventEmitter<KbqFilter>;
    /** Event that is generated whenever the user reset a filter changes. */
    readonly onResetFilterChanges: EventEmitter<KbqFilter | null>;
    /** header of popover. Depends on the mode */
    get popoverHeader(): string;
    /** Component state. true if opened dropdown or popup */
    get opened(): boolean;
    /** Selected filter */
    get filter(): KbqFilter | null;
    /** Component state. True if 'filters' input contains no elements. */
    get isEmpty(): boolean;
    /** localized data
     * @docs-private */
    get localeData(): any;
    constructor();
    ngOnInit(): void;
    selectFilter(filter: KbqFilter): void;
    saveChanges(): void;
    saveAsNew(event?: Event): void;
    showError(error?: KbqSaveFilterError): void;
    restoreFocus(): void;
    preparePopover(): void;
    openSaveAsNewFilterPopover(): void;
    openChangeFilterNamePopover(): void;
    closePopover: () => void;
    /** @docs-private */
    stopEventPropagation(event: Event): void;
    /** @docs-private */
    searchKeydownHandler(event: KeyboardEvent): void;
    /** @docs-private */
    onDropdownOpen(): void;
    resetFilterChanges(): void;
    /** Hide the popup and restore focus.
     * Use this method in the onSave, onSaveAsNew, or onChangeFilter events after the data has been successfully saved. */
    filterSavedSuccessfully(): void;
    /** Shows an error. Use this method in the onSave, onSaveAsNew, or onChangeFilter events if saving data failed. */
    filterSavedUnsuccessfully(error?: KbqSaveFilterError): void;
    private getFilteredOptions;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqFilters, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqFilters, "kbq-filters", ["kbqFilters"], { "filters": { "alias": "filters"; "required": false; }; }, { "onSelectFilter": "onSelectFilter"; "onSave": "onSave"; "onChangeFilter": "onChangeFilter"; "onSaveAsNew": "onSaveAsNew"; "onRemoveFilter": "onRemoveFilter"; "onResetFilterChanges": "onResetFilterChanges"; }, never, ["*"], true, never>;
}
