import { EventEmitter, ChangeDetectorRef, AfterViewInit, TemplateRef } from '@angular/core';
import { AdhocFieldConnectorService } from '../lf-field-adhoc-connector.service';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { AdhocFieldInfo } from '../lf-field-adhoc-container-types';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { FormControl } from '@angular/forms';
import { LfFieldAdhocContainerService } from '../lf-field-adhoc-container.service';
import { LfFieldInfo } from '../../field-components/utils/lf-field-types';
import { Observable } from 'rxjs';
import { AppLocalizationService } from '@laserfiche/lf-ui-components/internal-shared';
import * as i0 from "@angular/core";
/**
 * @internal
 */
export declare enum AddRemoveState {
    DEFAULT = "default",
    LOADING = "isLoading",
    HAS_ERROR = "hasError",
    DISPLAY_FIELD = "displayField"
}
/**
 * @internal
 */
export declare class LfFieldAddRemoveComponent implements AfterViewInit {
    private adHocConnectorService;
    ref: ChangeDetectorRef;
    popupDialog: MatDialog;
    private localizationService;
    private readonly APPLY_CHANGES;
    private readonly DO_YOU_WANT_TO_APPLY_YOUR_FIELD_CHANGES;
    private readonly YES;
    private readonly NO;
    readonly CANCEL: Observable<string>;
    readonly APPLY: Observable<string>;
    readonly ADD_REMOVE_FIELDS: Observable<string>;
    readonly NO_MATCHING_FIELDS_FOUND: Observable<string>;
    readonly SEARCH_FIELDS: Observable<string>;
    readonly AN_ERROR_OCCURED: Observable<string>;
    readonly LOCALIZED_FIELD_TYPES: Map<string, Observable<string>>;
    allFieldInfos: AdhocFieldInfo[];
    displayFieldInfos: AdhocFieldInfo[];
    selectedFieldIds: Set<number>;
    areCheckboxChanges: boolean;
    filterFieldsControl: FormControl;
    fieldFilterText: string;
    state: AddRemoveState;
    adhocFieldContainerService: LfFieldAdhocContainerService;
    dialogRef?: MatDialogRef<any>;
    popupModal?: TemplateRef<any>;
    checkboxUpdate: EventEmitter<void>;
    clickBack: EventEmitter<void>;
    constructor(adHocConnectorService: AdhocFieldConnectorService, ref: ChangeDetectorRef, popupDialog: MatDialog, localizationService: AppLocalizationService);
    ngAfterViewInit(): void;
    initAsync: (adhocContainerService: LfFieldAdhocContainerService) => Promise<void>;
    /** @internal */
    get shouldShowErrorMessage(): boolean;
    /** @internal */
    get isLoading(): boolean;
    onClickBack(): Promise<void>;
    onModalButtonClick(event: string): void;
    onClickApply(): void;
    onClickCancel(): void;
    onConfirmNo(): void;
    private filterDisplayedFields;
    onClearFields(): void;
    onUpdateCheckbox(changeEvent: MatCheckboxChange, field: LfFieldInfo): void;
    ignoreEscapeKeydown(event: KeyboardEvent): void;
    private updateSelectedOptions;
    updateSortedFieldInfos(): Promise<void>;
    private partitionFieldInfos;
    isFieldSelected(field: AdhocFieldInfo): boolean;
    getAppliedFields(): void;
    private loadFieldDefinitionsInOrderAsync;
    private getCurrentFieldOptionsAsync;
    /** @internal */
    private orderFieldInfosByName;
    static ɵfac: i0.ɵɵFactoryDeclaration<LfFieldAddRemoveComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<LfFieldAddRemoveComponent, "lf-field-add-remove-component", never, { "initAsync": { "alias": "initAsync"; "required": false; }; }, { "checkboxUpdate": "checkboxUpdate"; "clickBack": "clickBack"; }, never, never, false, never>;
}
