import * as i0 from '@angular/core';
import { OnInit, OnDestroy, TemplateRef, OnChanges } from '@angular/core';
import { Observable } from 'rxjs';
import { FormBuilder, NgForm } from '@angular/forms';
import { KPIDetails, DatapointSelectorModalOptions, DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector';
import { WidgetConfigComponent, WidgetConfigService, ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';
import { OnBeforeSave, DynamicComponent, RangeDisplay, DynamicComponentAlertAggregator, MeasurementRealtimeService, DynamicComponentComponent } from '@c8y/ngx-components';

type LinearGaugeWidgetConfig = {
    datapoints: KPIDetails[];
    fractionSize: number;
    orientation?: 'horizontal' | 'vertical' | null;
};

declare class LinearGaugeWidgetConfigComponent implements OnInit, OnBeforeSave, OnDestroy {
    private formBuilder;
    private form;
    private widgetConfig;
    private widgetConfigService;
    set previewMapSet(template: TemplateRef<unknown>);
    config: LinearGaugeWidgetConfig;
    formGroup: ReturnType<LinearGaugeWidgetConfigComponent['createForm']>;
    datapointSelectionConfig: Partial<DatapointSelectorModalOptions>;
    defaultFormOptions: Partial<DatapointAttributesFormConfig>;
    previewConfig: LinearGaugeWidgetConfig;
    previewActiveDatapoint: KPIDetails;
    private limits;
    private destroy$;
    constructor(formBuilder: FormBuilder, form: NgForm, widgetConfig: WidgetConfigComponent, widgetConfigService: WidgetConfigService);
    onBeforeSave(config?: LinearGaugeWidgetConfigComponent['config']): boolean | Promise<boolean> | Observable<boolean>;
    ngOnInit(): void;
    ngOnDestroy(): void;
    private initForm;
    private createForm;
    static ɵfac: i0.ɵɵFactoryDeclaration<LinearGaugeWidgetConfigComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<LinearGaugeWidgetConfigComponent, "c8y-linear-gauge-widget-config", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
}

declare class LinearGaugeWidgetViewComponent implements OnChanges, DynamicComponent {
    private measurementRealtime;
    private dashboard;
    private dynamicComponent?;
    config: LinearGaugeWidgetConfig;
    rangeDisplayConfig$: Observable<RangeDisplay>;
    alerts: DynamicComponentAlertAggregator;
    private activeDatapoint$;
    constructor(measurementRealtime: MeasurementRealtimeService, dashboard: ContextDashboardComponent, dynamicComponent?: DynamicComponentComponent);
    ngOnChanges(): void;
    private getRangeDisplayConfig$;
    private ensureIsNumber;
    private assignContextFromContextDashboard;
    private getOrientation;
    private getErrorType;
    private isInRange;
    private updateAlertStatus;
    static ɵfac: i0.ɵɵFactoryDeclaration<LinearGaugeWidgetViewComponent, [null, { optional: true; }, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<LinearGaugeWidgetViewComponent, "c8y-linear-gauge-widget-view", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
}

export { LinearGaugeWidgetConfigComponent, LinearGaugeWidgetViewComponent };
export type { LinearGaugeWidgetConfig };
//# sourceMappingURL=index.d.ts.map
