import { IFetchResponse, ISeries } from '@c8y/client';
import { AggregationOption } from '@c8y/ngx-components';
import { KPIDetails } from '@c8y/ngx-components/datapoint-selector';
import { MinMaxValues, SourceId, TimeStamp } from '@c8y/ngx-components/datapoints-export-selector';
import { Interval } from '@c8y/ngx-components/interval-picker';
export declare const DEFAULT_DPT_REFRESH_INTERVAL_VALUE = 30000;
export type DatapointTableMapKey = `${TimeStamp}_${DeviceName}`;
/**
 * Represents a mapping where the key is a datapoint identifier containing the date and device name, and the value is an array of data point table items or null.
 */
export type DataPointsTableMap = Map<DatapointTableMapKey, (DatapointTableItem | null)[]>;
type DeviceName = string;
/**
 * Represents a map of datapoints series data.
 * The key of the map is a source, and the value is the data for requested series.
 */
export type DatapointsSeriesDataMap = Map<SourceId, ISeries>;
/**
 * Determines which values will be displayed as values for datapoints.
 * e.g. if user chose 'min', only the minimum values will be displayed.
 */
export type RenderType = keyof typeof RENDER_TYPES_LABELS;
/**
 * Represents an object where key is a timestamp and value is an array
 * where first record contains min and max values for a corresponding timestamp.
 */
export type MeasurementRanges = {
    [key: TimeStamp]: Array<MinMaxValues>;
};
/**
 * Represents a value object where key is an object with min and max properties with its corresponding values.
 */
export type Value = {
    [key in keyof MinMaxValues]: number;
};
export declare const DATE_SELECTION_VALUES: {
    readonly dashboard_context: "dashboard_context";
    readonly config: "config";
    readonly view_and_config: "view_and_config";
};
export declare const DATE_SELECTION_VALUES_ARR: readonly ["dashboard_context", "config", "view_and_config"];
export declare const DATE_SELECTION_LABELS: {
    readonly config: "Widget configuration";
    readonly view_and_config: "Widget and widget configuration";
    readonly dashboard_context: "Dashboard time range";
};
export declare const REFRESH_INTERVAL_VALUES_ARR: number[];
export declare const RENDER_TYPES_LABELS: {
    readonly min: "Minimum";
    readonly max: "Maximum";
    readonly area: "Area";
};
export declare const INTERVAL_VALUES_ARR: readonly ["minutes", "hours", "days", "weeks", "months", "custom"];
export declare const TIME_RANGE_INTERVAL_LABELS: {
    readonly minutes: "Last minute";
    readonly hours: "Last hour";
    readonly days: "Last day";
    readonly weeks: "Last week";
    readonly months: "Last month";
    readonly custom: "Custom";
};
export declare const DURATION_OPTIONS: ({
    id: "minutes";
    label: "Last minute";
    unit: "minutes";
    amount: number;
} | {
    id: "hours";
    label: "Last hour";
    unit: "hours";
    amount: number;
} | {
    id: "days";
    label: "Last day";
    unit: "days";
    amount: number;
} | {
    id: "weeks";
    label: "Last week";
    unit: "weeks";
    amount: number;
} | {
    id: "months";
    label: "Last month";
    unit: "months";
    amount: number;
} | {
    id: "custom";
    label: "Custom";
    unit?: undefined;
    amount?: undefined;
})[];
export interface ColorRangeBoundaries {
    yellowRangeMin: number;
    yellowRangeMax: number;
    redRangeMin: number;
    redRangeMax: number;
}
export interface DatapointWithValues extends KPIDetails {
    seriesUnit?: string;
    values: MeasurementRanges;
}
export interface Duration {
    id: string;
    label: string;
    unit?: string;
    amount?: number;
}
export interface TableColumnHeader {
    deviceName: string;
    label: string;
    renderType: string;
    unit: string;
}
export interface DateRange {
    dateFrom: string;
    dateTo: string;
}
export interface DatapointsTableConfig {
    aggregation?: AggregationOption | null;
    context?: number;
    datapoints: KPIDetails[];
    /**
     * Array that contains global time context dateFrom and dateTo.
     */
    date?: string[];
    dateFrom: string;
    dateTo: string;
    decimalPlaces?: number;
    displayDateSelection: boolean;
    displaySettings: {
        globalTimeContext: boolean;
        globalRealtimeContext: boolean;
        globalAggregationContext: boolean;
        globalAutoRefreshContext: boolean;
    };
    interval: Interval['id'];
    isAutoRefreshEnabled: boolean;
    realtime: boolean;
    refreshInterval?: number;
    selected?: object | null;
    widgetInstanceGlobalTimeContext?: boolean | null;
    widgetInstanceGlobalAutoRefreshContext: boolean;
    globalDateSelector?: keyof typeof DATE_SELECTION_VALUES;
}
export interface DatapointTableItem {
    dateAndTime: string;
    deviceName: string;
    fragment: string;
    label: string;
    redRangeMax?: number;
    redRangeMin?: number;
    renderType: string;
    series: string;
    value: Value;
    yellowRangeMax?: number;
    yellowRangeMin?: number;
}
export interface GroupedDatapointTableItem {
    dateAndTime: string;
    deviceName: string;
    rowItems: ({
        fragment: string;
        label: string;
        redRangeMax?: number;
        redRangeMin?: number;
        renderType: string;
        series: string;
        value: Value;
        yellowRangeMax?: number;
        yellowRangeMin?: number;
    } | null)[];
}
export interface SeriesDataWithResponse {
    source: SourceId;
    data: ISeries;
    res: IFetchResponse;
}
export {};
//# sourceMappingURL=datapoints-table-widget.model.d.ts.map