import * as _angular_core from '@angular/core';
import { OnInit, OnChanges, OnDestroy, TemplateRef, SimpleChanges, ChangeDetectorRef } from '@angular/core';
import * as _c8y_ngx_components_echart from '@c8y/ngx-components/echart';
import { DatapointsGraphWidgetConfig, CHART_VIEW_CONTEXT, DatapointsGraphWidgetTimeProps, EventDetailsExtended, AlarmDetailsExtended, DatapointsGraphKPIDetails, AlarmOrEventExtended, SelectableDatapoint, ChartsComponent } from '@c8y/ngx-components/echart';
import { OnBeforeSave, DynamicComponentAlertAggregator, SelectableItem, WidgetTimeContextDateRangeService, DashboardChildComponent } from '@c8y/ngx-components';
import { SelectedDatapoint } from '@c8y/ngx-components/alarm-event-selector';
import { DatapointSelectorModalOptions } from '@c8y/ngx-components/datapoint-selector';
import { PresetName, GlobalContextState, GLOBAL_CONTEXT_DISPLAY_MODE, WidgetConfigMigrationService } from '@c8y/ngx-components/global-context';
import { Observable } from 'rxjs/internal/Observable';
import * as _c8y_client from '@c8y/client';
import { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';
import { ExportConfig } from '@c8y/ngx-components/datapoints-export-selector';
import { TranslateService } from '@ngx-translate/core';
import { BehaviorSubject } from 'rxjs';

declare class DatapointsGraphWidgetConfigComponent implements OnInit, OnChanges, OnBeforeSave, OnDestroy {
    private _config;
    private isFirstConfigSet;
    set config(value: DatapointsGraphWidgetConfig | undefined);
    get config(): DatapointsGraphWidgetConfig | undefined;
    set previewMapSet(template: TemplateRef<any>);
    private readonly formBuilder;
    private readonly form;
    private readonly widgetConfigService;
    private readonly chartHelpersService;
    private readonly gainsightService;
    alerts: DynamicComponentAlertAggregator | undefined;
    formGroup: ReturnType<DatapointsGraphWidgetConfigComponent['initForm']>;
    datapointSelectionConfig: Partial<DatapointSelectorModalOptions>;
    activeDatapointsExists: boolean;
    alarmsOrEventsHaveNoMatchingDps: boolean;
    chartViewContext: CHART_VIEW_CONTEXT;
    legendDisplayOptions: _c8y_ngx_components_echart.LegendDisplayOptionItem[];
    widgetControls: PresetName;
    previewContextConfig: _angular_core.Signal<GlobalContextState>;
    private destroy$;
    private isInitialized;
    constructor();
    ngOnInit(): Promise<void>;
    ngOnChanges(changes: SimpleChanges): void;
    ngOnDestroy(): void;
    onBeforeSave(config?: DatapointsGraphWidgetConfig): boolean | Promise<boolean> | Observable<boolean>;
    updateTimeRangeOnRealtime(timeRange: Pick<DatapointsGraphWidgetConfig, 'dateFrom' | 'dateTo'>): void;
    updateDashboardTimeContext(timeProps: DatapointsGraphWidgetTimeProps): void;
    updateAggregatedSliderDatapoint(selectedDatapoint: SelectedDatapoint | null): void;
    private applyFormValuesToConfig;
    private checkForMatchingDatapoints;
    private initForm;
    private setActiveDatapointsExists;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<DatapointsGraphWidgetConfigComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatapointsGraphWidgetConfigComponent, "c8y-datapoints-graph-widget-config", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
}

declare class DatapointsGraphWidgetViewComponent implements OnDestroy {
    private translate;
    private dashboardContextComponent;
    private widgetConfigMigrationService;
    private widgetTimeContextDateRangeService;
    private cdr;
    events: EventDetailsExtended[];
    alarms: AlarmDetailsExtended[];
    exportConfig: ExportConfig;
    AGGREGATION_ICONS: Record<"undefined" | _c8y_client.aggregationType, string>;
    AGGREGATION_TEXTS: Record<"undefined" | _c8y_client.aggregationType | "disabled", string>;
    alerts: DynamicComponentAlertAggregator | undefined;
    datapointsOutOfSync: Map<DatapointsGraphKPIDetails, boolean>;
    hasAtLeastOneDatapointActive: boolean;
    hasAtLeastOneAlarmActive: boolean;
    isMarkedAreaEnabled: boolean;
    loadedDatapoints: DatapointsGraphKPIDetails[];
    loadedAlarmsOrEvents: AlarmOrEventExtended[];
    isLoading$: BehaviorSubject<boolean>;
    isSliderBeingDragged$: BehaviorSubject<boolean>;
    enabledMarkedAreaAlarmType: string | undefined;
    chartViewContext: CHART_VIEW_CONTEXT;
    private dashboardChild;
    displayMode: _angular_core.WritableSignal<"dashboard" | "config" | "view_and_config">;
    contextConfig: _angular_core.WritableSignal<GlobalContextState>;
    isLinkedToGlobal: _angular_core.WritableSignal<boolean>;
    widgetControls: _angular_core.WritableSignal<PresetName>;
    readonly GLOBAL_CONTEXT_DISPLAY_MODE: typeof GLOBAL_CONTEXT_DISPLAY_MODE;
    /** Combined number of datapoints, alarms, and events */
    totalLegendItems: number;
    /** Selectable items for the datapoints, alarms, events dropdown */
    selectableItems: SelectableItem<SelectableDatapoint>[];
    /** Selected items from the dropdown */
    selectedItems: SelectableItem<SelectableDatapoint>[];
    set config(value: DatapointsGraphWidgetConfig);
    get config(): never;
    chartComponent: ChartsComponent;
    displayConfig: DatapointsGraphWidgetConfig | undefined;
    legendHelp: any;
    readonly disableZoomInLabel: "Disable zoom in";
    readonly enableZoomInLabel: "Click to enable zoom, then click and drag on the desired area in the chart.";
    readonly hideDatapointLabel: "Hide data point";
    readonly showDatapointLabel: "Show data point";
    private destroy$;
    private readonly widgetInstanceId;
    constructor(translate: TranslateService, dashboardContextComponent: ContextDashboardComponent, widgetConfigMigrationService: WidgetConfigMigrationService, widgetTimeContextDateRangeService: WidgetTimeContextDateRangeService, cdr: ChangeDetectorRef);
    ngOnInit(): void;
    onContextChange(event: {
        context: GlobalContextState;
        diff: GlobalContextState;
    }): void;
    ngOnDestroy(): void;
    updateDashboardTimeContext(timeProps: DatapointsGraphWidgetTimeProps): void;
    getDashboardChild(): DashboardChildComponent;
    onRefresh(): void;
    buildSelectableItems(): SelectableItem<SelectableDatapoint>[];
    onItemSelected(item: SelectableItem<SelectableDatapoint>): void;
    onItemDeselected(item: SelectableItem<SelectableDatapoint>): void;
    toggleChart(datapoint: DatapointsGraphKPIDetails): void;
    handleDatapointOutOfSync(dpOutOfSync: DatapointsGraphKPIDetails): void;
    toggleMarkedArea(alarm: AlarmDetailsExtended): void;
    toggleAlarmEventType(alarmOrEvent: AlarmOrEventExtended): void;
    updateAlarmsAndEvents(alarmsEventsConfigs: AlarmOrEventExtended[]): void;
    filterSeverity(eventTarget: any): void;
    isLastActiveDatapoint(selectedItem: SelectableItem<SelectableDatapoint>): boolean;
    private updateExportConfig;
    private updateSelectedItems;
    private assignContextFromContextDashboard;
    /**
     * Remove hidden items from loaded cache so they will be reloaded when toggled visible.
     * Called when context changes (time range, aggregation, etc.) to mark hidden items data as stale.
     */
    private invalidateHiddenItemsCache;
    private computeRealtimeFlag;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<DatapointsGraphWidgetViewComponent, [null, { optional: true; }, null, null, null]>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatapointsGraphWidgetViewComponent, "c8y-datapoints-graph-widget-view", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
}

export { DatapointsGraphWidgetConfigComponent, DatapointsGraphWidgetViewComponent };
//# sourceMappingURL=index.d.ts.map
