import { Component, EventEmitter, Input, Output } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AGGREGATION_LABELS, AGGREGATION_VALUES_ARR, CoreModule } from '@c8y/ngx-components';
import { PopoverModule } from 'ngx-bootstrap/popover';
import { EXPORT_MODE_LABELS, EXPORT_MODE_VALUES } from '../../../datapoints-export-selector.model';
import * as i0 from "@angular/core";
import * as i1 from "@c8y/ngx-components";
import * as i2 from "@angular/common";
import * as i3 from "@angular/forms";
import * as i4 from "ngx-bootstrap/popover";
export class DataPointsExportSelectorDataScopeComponent {
    constructor() {
        this.onAggregationChange = new EventEmitter();
        this.onExportTypeChange = new EventEmitter();
        this.AGGREGATION_LABELS = AGGREGATION_LABELS;
        this.AGGREGATION_VALUES_ARR = AGGREGATION_VALUES_ARR;
        this.EXPORT_MODE_LABELS = EXPORT_MODE_LABELS;
        this.EXPORT_MODE_VALUES_ARR = [EXPORT_MODE_VALUES.full, EXPORT_MODE_VALUES.compact];
    }
    emitAggregationChange(aggregation) {
        this.onAggregationChange.emit(aggregation);
    }
    emitExportTypeChange(exportType) {
        this.onExportTypeChange.emit(exportType);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DataPointsExportSelectorDataScopeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: DataPointsExportSelectorDataScopeComponent, isStandalone: true, selector: "c8y-datapoints-export-selector-data-scope", inputs: { disabledAggregationOptions: "disabledAggregationOptions", formGroup: "formGroup" }, outputs: { onAggregationChange: "onAggregationChange", onExportTypeChange: "onExportTypeChange" }, ngImport: i0, template: "<fieldset class=\"c8y-fieldset\">\n    <legend class=\"d-flex a-i-center\">\n      {{ 'Data scope' | translate }}\n      <button\n        class=\"btn-help\"\n        [attr.aria-label]=\"'Help' | translate\"\n        [popover]=\"popoverDataScopeTemplate\"\n        placement=\"right\"\n        triggers=\"focus\"\n        container=\"body\"\n        type=\"button\"\n        [adaptivePosition]=\"true\"\n      ></button>\n      <ng-template #popoverDataScopeTemplate>\n        <p\n          class=\"m-b-8\"\n          translate\n        >\n          Choose type of an export to generate, the available options are:\n        </p>\n        <p><strong translate>Compact</strong></p>\n        <ul class=\"p-l-16\">\n          <li translate>\n            Up to 5,000 records per data point, or up to the data retention limit\n          </li>\n          <li translate>Creates a single merged file containing all the data</li>\n          <li translate>Preview is not available</li>\n          <li translate>Supports data aggregation (optional)</li>\n        </ul>\n        <p><strong translate>Full</strong></p>\n        <ul class=\"p-l-16\">\n          <li translate>\n            Up to 1,000,000 records per data point, or up to the data retention limit\n          </li>\n          <li translate>\n            If the export exceeds 50,000 records, the data will be sent via email\n          </li>\n          <li translate>\n            Creates a compressed ZIP file that contains separate data files for each of your\n            selected points\n          </li>\n          <li translate>Preview is available</li>\n          <li translate>No data aggregation</li>\n        </ul>\n      </ng-template>\n    </legend>\n    <c8y-form-group class=\"m-b-8\">\n      <label>\n        {{ 'Export mode' | translate }}\n      </label>\n      <div\n        class=\"c8y-select-wrapper\"\n        [formGroup]=\"formGroup\"\n      >\n        <select\n          class=\"form-control text-12\"\n          [title]=\"'Export mode' | translate\"\n          id=\"exportMode\"\n          formControlName=\"exportMode\"\n          (ngModelChange)=\"emitExportTypeChange($event)\"\n        >\n          <option\n            *ngFor=\"let exportModeValue of EXPORT_MODE_VALUES_ARR\"\n            [ngValue]=\"exportModeValue\"\n          >\n            {{ EXPORT_MODE_LABELS[exportModeValue] | translate }}\n          </option>\n        </select>\n      </div>\n    </c8y-form-group>\n    <c8y-form-group class=\"m-b-8\">\n      <label>\n        {{ 'Aggregation' | translate }}\n      </label>\n      <div\n        class=\"c8y-select-wrapper\"\n        [formGroup]=\"formGroup\"\n      >\n        <select\n          class=\"form-control text-12\"\n          [title]=\"'Aggregation' | translate\"\n          id=\"aggregation\"\n          formControlName=\"aggregation\"\n          (ngModelChange)=\"emitAggregationChange($event)\"\n        >\n          <option\n            *ngFor=\"let aggregationValue of AGGREGATION_VALUES_ARR\"\n            [ngValue]=\"aggregationValue\"\n            [disabled]=\"disabledAggregationOptions[aggregationValue]\"\n          >\n            {{ AGGREGATION_LABELS[aggregationValue] | translate }}\n          </option>\n        </select>\n      </div>\n    </c8y-form-group>\n  </fieldset>", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i1.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i4.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DataPointsExportSelectorDataScopeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-datapoints-export-selector-data-scope', standalone: true, imports: [CoreModule, FormsModule, PopoverModule], template: "<fieldset class=\"c8y-fieldset\">\n    <legend class=\"d-flex a-i-center\">\n      {{ 'Data scope' | translate }}\n      <button\n        class=\"btn-help\"\n        [attr.aria-label]=\"'Help' | translate\"\n        [popover]=\"popoverDataScopeTemplate\"\n        placement=\"right\"\n        triggers=\"focus\"\n        container=\"body\"\n        type=\"button\"\n        [adaptivePosition]=\"true\"\n      ></button>\n      <ng-template #popoverDataScopeTemplate>\n        <p\n          class=\"m-b-8\"\n          translate\n        >\n          Choose type of an export to generate, the available options are:\n        </p>\n        <p><strong translate>Compact</strong></p>\n        <ul class=\"p-l-16\">\n          <li translate>\n            Up to 5,000 records per data point, or up to the data retention limit\n          </li>\n          <li translate>Creates a single merged file containing all the data</li>\n          <li translate>Preview is not available</li>\n          <li translate>Supports data aggregation (optional)</li>\n        </ul>\n        <p><strong translate>Full</strong></p>\n        <ul class=\"p-l-16\">\n          <li translate>\n            Up to 1,000,000 records per data point, or up to the data retention limit\n          </li>\n          <li translate>\n            If the export exceeds 50,000 records, the data will be sent via email\n          </li>\n          <li translate>\n            Creates a compressed ZIP file that contains separate data files for each of your\n            selected points\n          </li>\n          <li translate>Preview is available</li>\n          <li translate>No data aggregation</li>\n        </ul>\n      </ng-template>\n    </legend>\n    <c8y-form-group class=\"m-b-8\">\n      <label>\n        {{ 'Export mode' | translate }}\n      </label>\n      <div\n        class=\"c8y-select-wrapper\"\n        [formGroup]=\"formGroup\"\n      >\n        <select\n          class=\"form-control text-12\"\n          [title]=\"'Export mode' | translate\"\n          id=\"exportMode\"\n          formControlName=\"exportMode\"\n          (ngModelChange)=\"emitExportTypeChange($event)\"\n        >\n          <option\n            *ngFor=\"let exportModeValue of EXPORT_MODE_VALUES_ARR\"\n            [ngValue]=\"exportModeValue\"\n          >\n            {{ EXPORT_MODE_LABELS[exportModeValue] | translate }}\n          </option>\n        </select>\n      </div>\n    </c8y-form-group>\n    <c8y-form-group class=\"m-b-8\">\n      <label>\n        {{ 'Aggregation' | translate }}\n      </label>\n      <div\n        class=\"c8y-select-wrapper\"\n        [formGroup]=\"formGroup\"\n      >\n        <select\n          class=\"form-control text-12\"\n          [title]=\"'Aggregation' | translate\"\n          id=\"aggregation\"\n          formControlName=\"aggregation\"\n          (ngModelChange)=\"emitAggregationChange($event)\"\n        >\n          <option\n            *ngFor=\"let aggregationValue of AGGREGATION_VALUES_ARR\"\n            [ngValue]=\"aggregationValue\"\n            [disabled]=\"disabledAggregationOptions[aggregationValue]\"\n          >\n            {{ AGGREGATION_LABELS[aggregationValue] | translate }}\n          </option>\n        </select>\n      </div>\n    </c8y-form-group>\n  </fieldset>" }]
        }], propDecorators: { disabledAggregationOptions: [{
                type: Input
            }], formGroup: [{
                type: Input
            }], onAggregationChange: [{
                type: Output
            }], onExportTypeChange: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 