import { OnInit } from '@angular/core';
import { MeasurementRealtimeService } from '@c8y/ngx-components';
import { KPIDetails } from '@c8y/ngx-components/datapoint-selector';
import { Observable } from 'rxjs';
import { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';
import { KpiWidgetConfig } from '../kpi-widget.model';
import * as i0 from "@angular/core";
interface MeasurementValue {
    unit?: string;
    value: number;
    date: string;
}
declare enum ColorClass {
    danger = "text-danger",
    warning = "text-warning",
    unknown = ""
}
export declare class KpiWidgetViewComponent implements OnInit {
    private measurementRealtime;
    private dashboard;
    config: KpiWidgetConfig;
    state$: Observable<{
        latestMeasurement: MeasurementValue;
        previousValue: MeasurementValue | undefined;
        trend: string;
        unit: string;
        colorClass: ColorClass;
    }>;
    noDataInitiallyInDB: boolean;
    constructor(measurementRealtime: MeasurementRealtimeService, dashboard: ContextDashboardComponent);
    ngOnInit(): Promise<void>;
    setupObservable(datapoint: KPIDetails): Observable<{
        latestMeasurement: MeasurementValue;
        previousValue: MeasurementValue | undefined;
        trend: string;
        unit: string;
        colorClass: ColorClass;
    }>;
    private getLatestMeasurement$;
    private getColorClass$;
    private getLastTwoValuesOfObservable$;
    private getTrendOfLatestMeasurements$;
    private inRangeOf;
    private assignContextFromContextDashboard;
    static ɵfac: i0.ɵɵFactoryDeclaration<KpiWidgetViewComponent, [null, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KpiWidgetViewComponent, "c8y-kpi-widget-view", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
}
export {};
//# sourceMappingURL=kpi-widget-view.component.d.ts.map