import { __decorate } from "tslib";
import { Component, Input } from '@angular/core';
import { NEVER } from 'rxjs';
import { MonitoringAppGenComponent } from '../../metadata/decorators';
import { GaugeCardComponent } from '../gauge-card/gauge-card.component';
import * as i0 from "@angular/core";
import * as i1 from "@swimlane/ngx-charts";
import * as i2 from "@ionic/angular";
import * as i3 from "@angular/common";
import * as i4 from "../../ui-directive/export-data.directive";
let TapVariableGaugeComponent = class TapVariableGaugeComponent extends GaugeCardComponent {
    set variable(v) {
        if (v) {
            this.inputStream = v.values;
        }
        else {
            this.inputStream = NEVER;
        }
    }
};
/** @nocollapse */ /** @nocollapse */ TapVariableGaugeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TapVariableGaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ TapVariableGaugeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TapVariableGaugeComponent, selector: "tap-variable-gauge", inputs: { variable: "variable" }, usesInheritance: true, ngImport: i0, template: "<div class=\"chart-container\" style=\"position: relative\">\n  <ngx-charts-gauge\n    #ngxChartsGauge\n    [scheme]=\"colorScheme\"\n    [results]=\"results\"\n    [min]=\"min\"\n    [max]=\"max\"\n    [angleSpan]=\"angleSpan\"\n    [startAngle]=\"startAngle\"\n    [units]=\"units\"\n    [bigSegments]=\"bigSegments\"\n    [smallSegments]=\"smallSegments\"\n    [legend]=\"legend\"\n    [legendTitle]=\"legendTitle\"\n    [valueFormatting]=\"valueFormatting\"\n    [showText]=\"showText && loaded\"\n    [view]=\"view\"\n    (select)=\"onSelect($event)\"\n  >\n  </ngx-charts-gauge>\n  <ion-fab-button\n    id=\"exportFabButton\"\n    size=\"small\"\n    tapExportData\n    [dataToExport]=\"results\"\n    [exportedFileName]=\"exportedFileName\"\n    *ngIf=\"showExportButton\"\n  >\n    <ion-icon name=\"download\"></ion-icon>\n  </ion-fab-button>\n</div>\n", styles: [".chart-container{display:grid}@media (prefers-color-scheme: dark){::ng-deep span.legend-label-text{color:#ccc!important}::ng-deep span.legend-label-text:hover{color:#fff!important}::ng-deep .ngx-charts text{fill:#fff!important}}#exportFabButton{position:absolute;top:10px;right:10px}\n"], components: [{ type: i1.GaugeComponent, selector: "ngx-charts-gauge", inputs: ["legend", "legendTitle", "legendPosition", "min", "max", "bigSegments", "smallSegments", "showAxis", "startAngle", "angleSpan", "activeEntries", "tooltipDisabled", "showText", "margin", "textValue", "units", "results", "axisTickFormatting", "valueFormatting"], outputs: ["activate", "deactivate"] }, { type: i2.IonFabButton, selector: "ion-fab-button", inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"] }, { type: i2.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.ExportDataDirective, selector: "[tapExportData]", inputs: ["exportedFileName", "dataToExport"], outputs: ["exportDataError"] }] });
TapVariableGaugeComponent = __decorate([
    MonitoringAppGenComponent({
        constraints: {
            isNumber: 'YES',
        },
    })
], TapVariableGaugeComponent);
export { TapVariableGaugeComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TapVariableGaugeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'tap-variable-gauge', template: "<div class=\"chart-container\" style=\"position: relative\">\n  <ngx-charts-gauge\n    #ngxChartsGauge\n    [scheme]=\"colorScheme\"\n    [results]=\"results\"\n    [min]=\"min\"\n    [max]=\"max\"\n    [angleSpan]=\"angleSpan\"\n    [startAngle]=\"startAngle\"\n    [units]=\"units\"\n    [bigSegments]=\"bigSegments\"\n    [smallSegments]=\"smallSegments\"\n    [legend]=\"legend\"\n    [legendTitle]=\"legendTitle\"\n    [valueFormatting]=\"valueFormatting\"\n    [showText]=\"showText && loaded\"\n    [view]=\"view\"\n    (select)=\"onSelect($event)\"\n  >\n  </ngx-charts-gauge>\n  <ion-fab-button\n    id=\"exportFabButton\"\n    size=\"small\"\n    tapExportData\n    [dataToExport]=\"results\"\n    [exportedFileName]=\"exportedFileName\"\n    *ngIf=\"showExportButton\"\n  >\n    <ion-icon name=\"download\"></ion-icon>\n  </ion-fab-button>\n</div>\n", styles: [".chart-container{display:grid}@media (prefers-color-scheme: dark){::ng-deep span.legend-label-text{color:#ccc!important}::ng-deep span.legend-label-text:hover{color:#fff!important}::ng-deep .ngx-charts text{fill:#fff!important}}#exportFabButton{position:absolute;top:10px;right:10px}\n"] }]
        }], propDecorators: { variable: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwLXZhcmlhYmxlLWdhdWdlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2lvdGl6ZS1pb25pYy9tb25pdG9yaW5nL3NyYy9saWIvdWktY29tcG9uZW50cy90YXAtdmFyaWFibGUtZ2F1Z2UvdGFwLXZhcmlhYmxlLWdhdWdlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2lvdGl6ZS1pb25pYy9tb25pdG9yaW5nL3NyYy9saWIvdWktY29tcG9uZW50cy9nYXVnZS1jYXJkL2dhdWdlLWNhcmQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRWpELE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDN0IsT0FBTyxFQUFFLHlCQUF5Qix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