import { AggregationOption, AggregationOptionStatus, AggregationService, AlertService } from '@c8y/ngx-components';
import { TranslateService } from '@ngx-translate/core';
import { DataToExport, DataToExportWithBackendCreatedFile, MergedExportDetails, TimeRangeInterval } from '../../datapoints-export-selector.model';
import { DataProcessingService } from './data-processing.service';
import * as i0 from "@angular/core";
export declare class DatapointsExportSelectorFileExporterService {
    private aggregationService;
    private alertService;
    private datapointsExportSelectorDataProcessingService;
    private translateService;
    /**
     * Cached data is reused when both CSV and Excel files were selected for export, used for merged file.
     */
    private cachedFlatteredAndSortedSeriesExportData;
    /**
     * Cached data is reused when both CSV and Excel files were selected for export, used for raw files.
     */
    private cachedRawExportSeriesData;
    constructor(aggregationService: AggregationService, alertService: AlertService, datapointsExportSelectorDataProcessingService: DataProcessingService, translateService: TranslateService);
    /**
     * Determines the interval between two dates.
     *
     * @param dateFrom - The starting date in ISO 8601 string format.
     * @param dateTo - The ending date in ISO 8601 string format.
     * @returns The time range interval unit.
     */
    determineInterval(dateFrom: string, dateTo: string): TimeRangeInterval;
    /**
     * Updates the disabled state of aggregation options based on the current value of the time interval form control.
     *
     * This method:
     * - Retrieves the current date range from the form controls.
     * - Determines the current time interval based on the date range.
     * - Sets the disabled state for each aggregation option based on predefined conditions.
     *
     * The disabled state is stored in the `disabledAggregationOptions` object,
     * where the key is the aggregation value and the value is a boolean indicating whether the option should be disabled.
     *
     * The `disabledConditions` object defines the conditions under which each aggregation option should be disabled.
     *
     * @param dateFrom - The value of the "date from" input.
     * @param dateTo - The value of the "date to" input.
     * @param disabledAggregationOptions - The object containing the disabled state of aggregation options.
     * @returns The updated object with the disabled state of aggregation options.
     */
    updateDisabledStateOfAggregationOptionEntries(dateFrom: string, dateTo: string, disabledAggregationOptions: AggregationOptionStatus): AggregationOptionStatus;
    /**
     * Sets the aggregation control to the first available (non-disabled) option if the current option is disabled.
     *
     * This method:
     * - Retrieves the current value of the aggregation control.
     * - Checks if the current aggregation option is disabled.
     * - If the current option is disabled, sets the control to the first available (non-disabled) option based on the following order:
     *   - If the current value is `DAILY`, it switches to `HOURLY` if it's not disabled, otherwise to `MINUTELY` if `HOURLY` is also disabled.
     *   - If the current value is `HOURLY`, it switches to `MINUTELY` if it's not disabled.
     *   - If all options are disabled, it sets the value to `NONE`.
     *
     * The disabled state is stored in the `disabledAggregationOptions` object,
     * where the key is the aggregation value and the value is a boolean indicating whether the option is disabled.
     *
     * The `AGGREGATION_VALUES` object defines the possible aggregation values.
     *
     * @param aggregationValue - The value of the current aggregation option.
     * @param disabledAggregationOptions - An object containing disabled aggregation options.
     * @returns The new aggregation option to be set.
     */
    setToFirstAvailableAggregationOptionIfCurrentIsDisabled(aggregationValue: string, disabledAggregationOptions: AggregationOptionStatus): AggregationOption;
    getMeasurementExportedDataBlob(extension: string, dataToExport: DataToExportWithBackendCreatedFile[]): Promise<Blob | null>;
    getSeriesExportedDataBlob(fileType: string, dataToExport: DataToExport[], mergedExportDetails: MergedExportDetails): Promise<Blob | null>;
    cleanupCachedData(): void;
    private showZipCreationErrorAlert;
    private getMeasurementDataZipBlob;
    private createRawMeasurementExportedFiles;
    /**
     * Converts data to a specified file type and returns the generated blob.
     *
     * Unlike measurements, data must be transformed to an exportable file structure before exporting.
     *
     * @param fileType - The type of file to which the data points should be exported. This can be 'csv' or 'excel'.
     * @param dataToExport - An array of processed measurement data combined with the respective properties of the datapoint.
     * @param mergedExportDetails - The details for the merged export, contains date range and aggregation.
     * @returns A promise that resolves to the generated ZIP blob or null if an error occurs.
     */
    private getSeriesDataBlob;
    private transformSeriesDataToExportableFileStructure;
    static ɵfac: i0.ɵɵFactoryDeclaration<DatapointsExportSelectorFileExporterService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<DatapointsExportSelectorFileExporterService>;
}
//# sourceMappingURL=datapoints-export-selector-file-exporter.service.d.ts.map