import { CdkDragDrop } from '@angular/cdk/drag-drop';
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { AbstractControl, ControlValueAccessor, FormArray, FormBuilder, ValidationErrors, Validator } from '@angular/forms';
import { IResultList } from '@c8y/client';
import { WidgetConfigComponent } from '@c8y/ngx-components/context-dashboard';
import { Observable } from 'rxjs';
import { DatapointLibraryService } from '../datapoint-library.service';
import { DatapointAction, DatapointAttributesFormConfig, KPIDetails, ManagedObjectKPI } from '../datapoint-selection.model';
import { DatapointSelectorModalOptions } from '../datapoint-selector-modal/datapoint-selector-modal.model';
import { DatapointSelectorService } from '../datapoint-selector.service';
import * as i0 from "@angular/core";
export declare class DatapointSelectionListComponent implements ControlValueAccessor, Validator, OnInit, OnChanges {
    private datapointSelector;
    private datapointLibrary;
    private formBuilder;
    private widgetComponent;
    actions: DatapointAction[];
    allowDragAndDrop: boolean;
    config: Partial<DatapointSelectorModalOptions>;
    defaultFormOptions: Partial<DatapointAttributesFormConfig>;
    maxActiveCount: number;
    minActiveCount: number;
    resolveContext: boolean;
    listTitle: string;
    formArray: FormArray;
    datapointLibraryEntries: Observable<IResultList<ManagedObjectKPI>>;
    maxActiveCountReached: boolean;
    isValid: Observable<boolean>;
    change: Observable<any[]>;
    private usedValidators;
    constructor(datapointSelector: DatapointSelectorService, datapointLibrary: DatapointLibraryService, formBuilder: FormBuilder, widgetComponent: WidgetConfigComponent);
    ngOnChanges(changes: SimpleChanges): void;
    registerOnTouched(fn: any): void;
    validate(_control: AbstractControl): ValidationErrors;
    ngOnInit(): void;
    writeValue(obj: KPIDetails[]): void;
    registerOnChange(fn: any): void;
    add(): void;
    onItemRemoved(index: number): void;
    drop(event: CdkDragDrop<KPIDetails[]>): void;
    private transformValue;
    private calculateMaxActiveCount;
    static ɵfac: i0.ɵɵFactoryDeclaration<DatapointSelectionListComponent, [null, null, null, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DatapointSelectionListComponent, "c8y-datapoint-selection-list", never, { "actions": { "alias": "actions"; "required": false; }; "allowDragAndDrop": { "alias": "allowDragAndDrop"; "required": false; }; "config": { "alias": "config"; "required": false; }; "defaultFormOptions": { "alias": "defaultFormOptions"; "required": false; }; "maxActiveCount": { "alias": "maxActiveCount"; "required": false; }; "minActiveCount": { "alias": "minActiveCount"; "required": false; }; "resolveContext": { "alias": "resolveContext"; "required": false; }; "listTitle": { "alias": "listTitle"; "required": false; }; }, { "isValid": "isValid"; "change": "change"; }, never, [".alert"], false, never>;
}
//# sourceMappingURL=datapoint-selection-list.component.d.ts.map