import { A11yModule } from '@angular/cdk/a11y';
import { Component, Input } from '@angular/core';
import { CoreModule } from '@c8y/ngx-components';
import { PopoverModule } from 'ngx-bootstrap/popover';
import { MEASUREMENTS_PREVIEW_ITEMS_LIMIT } 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 "ngx-bootstrap/popover";
export class DataPointsExportSelectorPreviewComponent {
    constructor() {
        this.MEASUREMENTS_PREVIEW_ITEMS_LIMIT = MEASUREMENTS_PREVIEW_ITEMS_LIMIT;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DataPointsExportSelectorPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DataPointsExportSelectorPreviewComponent, isStandalone: true, selector: "c8y-datapoints-export-selector-preview", inputs: { hasFetchedDataAnyValuesToExport: "hasFetchedDataAnyValuesToExport", isPreviewLoading: "isPreviewLoading", previewTableData: "previewTableData" }, ngImport: i0, template: "<div class=\"p-t-16 p-l-16 p-r-16 m-b-0\">\n  <div class=\"d-flex a-i-center\">\n    <label\n      class=\"m-b-0 d-flex a-i-center gap-4\"\n      [title]=\"'Preview`of exported file`' | translate\"\n    >\n      {{ 'Preview`of exported file`' | translate }}\n      <button\n        class=\"btn-help\"\n        [attr.aria-label]=\"'Help' | translate\"\n        [popover]=\"popoverPreviewTemplate\"\n        placement=\"right\"\n        triggers=\"focus\"\n        data-cy=\"preview--help\"\n        container=\"body\"\n        type=\"button\"\n        [adaptivePosition]=\"true\"\n      ></button>\n      <ng-template #popoverPreviewTemplate>\n        <span translate>\n          <p>The preview shows the structure of the raw file from a single source.</p>\n          <p>If no data is available, only the column headers are visible.</p>\n          <p>\n            The preview is limited to\n            <b>{{ MEASUREMENTS_PREVIEW_ITEMS_LIMIT }}</b>\n            records.\n          </p>\n        </span>\n      </ng-template>\n    </label>\n  </div>\n  <div\n    class=\"table-responsive\"\n    style=\"min-height: 275px\"\n  >\n    <table class=\"table\">\n      <thead>\n        <tr>\n          <th>{{ 'Time' | translate }}</th>\n          <th>{{ 'Source' | translate }}</th>\n          <th>{{ 'Device name' | translate }}</th>\n          <th>\n            {{ 'Fragment and series' | translate }}\n          </th>\n          <th>{{ 'Value' | translate }}</th>\n          <th>{{ 'Unit' | translate }}</th>\n        </tr>\n      </thead>\n      <ng-container *ngIf=\"hasFetchedDataAnyValuesToExport || isPreviewLoading; else emptyState\">\n        <ng-container *ngIf=\"!isPreviewLoading; else loading\">\n          <tbody>\n            <tr *ngFor=\"let row of previewTableData\">\n              <td>{{ row.time }}</td>\n              <td>{{ row.source }}</td>\n              <td>{{ row.device_name }}</td>\n              <td>\n                {{ row.fragment_series }}\n              </td>\n              <td>{{ row.value }}</td>\n              <td>{{ row.unit }}</td>\n            </tr>\n          </tbody>\n        </ng-container>\n      </ng-container>\n      <ng-template #emptyState>\n        <tbody>\n          <tr>\n            <td colspan=\"8\">\n              <div class=\"d-col a-i-center\">\n                <c8y-ui-empty-state\n                  [icon]=\"'search'\"\n                  [title]=\"'No data available.' | translate\"\n                  [horizontal]=\"true\"\n                  data-cy=\"datapoints-table-list--empty-state\"\n                ></c8y-ui-empty-state>\n              </div>\n            </td>\n          </tr>\n        </tbody>\n      </ng-template>\n      <ng-template #loading>\n        <tbody>\n          <tr>\n            <td colspan=\"8\">\n              <c8y-loading></c8y-loading>\n            </td>\n          </tr>\n        </tbody>\n      </ng-template>\n    </table>\n  </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { 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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i3.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.13", ngImport: i0, type: DataPointsExportSelectorPreviewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-datapoints-export-selector-preview', standalone: true, imports: [A11yModule, CoreModule, PopoverModule], template: "<div class=\"p-t-16 p-l-16 p-r-16 m-b-0\">\n  <div class=\"d-flex a-i-center\">\n    <label\n      class=\"m-b-0 d-flex a-i-center gap-4\"\n      [title]=\"'Preview`of exported file`' | translate\"\n    >\n      {{ 'Preview`of exported file`' | translate }}\n      <button\n        class=\"btn-help\"\n        [attr.aria-label]=\"'Help' | translate\"\n        [popover]=\"popoverPreviewTemplate\"\n        placement=\"right\"\n        triggers=\"focus\"\n        data-cy=\"preview--help\"\n        container=\"body\"\n        type=\"button\"\n        [adaptivePosition]=\"true\"\n      ></button>\n      <ng-template #popoverPreviewTemplate>\n        <span translate>\n          <p>The preview shows the structure of the raw file from a single source.</p>\n          <p>If no data is available, only the column headers are visible.</p>\n          <p>\n            The preview is limited to\n            <b>{{ MEASUREMENTS_PREVIEW_ITEMS_LIMIT }}</b>\n            records.\n          </p>\n        </span>\n      </ng-template>\n    </label>\n  </div>\n  <div\n    class=\"table-responsive\"\n    style=\"min-height: 275px\"\n  >\n    <table class=\"table\">\n      <thead>\n        <tr>\n          <th>{{ 'Time' | translate }}</th>\n          <th>{{ 'Source' | translate }}</th>\n          <th>{{ 'Device name' | translate }}</th>\n          <th>\n            {{ 'Fragment and series' | translate }}\n          </th>\n          <th>{{ 'Value' | translate }}</th>\n          <th>{{ 'Unit' | translate }}</th>\n        </tr>\n      </thead>\n      <ng-container *ngIf=\"hasFetchedDataAnyValuesToExport || isPreviewLoading; else emptyState\">\n        <ng-container *ngIf=\"!isPreviewLoading; else loading\">\n          <tbody>\n            <tr *ngFor=\"let row of previewTableData\">\n              <td>{{ row.time }}</td>\n              <td>{{ row.source }}</td>\n              <td>{{ row.device_name }}</td>\n              <td>\n                {{ row.fragment_series }}\n              </td>\n              <td>{{ row.value }}</td>\n              <td>{{ row.unit }}</td>\n            </tr>\n          </tbody>\n        </ng-container>\n      </ng-container>\n      <ng-template #emptyState>\n        <tbody>\n          <tr>\n            <td colspan=\"8\">\n              <div class=\"d-col a-i-center\">\n                <c8y-ui-empty-state\n                  [icon]=\"'search'\"\n                  [title]=\"'No data available.' | translate\"\n                  [horizontal]=\"true\"\n                  data-cy=\"datapoints-table-list--empty-state\"\n                ></c8y-ui-empty-state>\n              </div>\n            </td>\n          </tr>\n        </tbody>\n      </ng-template>\n      <ng-template #loading>\n        <tbody>\n          <tr>\n            <td colspan=\"8\">\n              <c8y-loading></c8y-loading>\n            </td>\n          </tr>\n        </tbody>\n      </ng-template>\n    </table>\n  </div>\n</div>\n" }]
        }], propDecorators: { hasFetchedDataAnyValuesToExport: [{
                type: Input
            }], isPreviewLoading: [{
                type: Input
            }], previewTableData: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 