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 "@angular/common";
import * as i2 from "@swimlane/ngx-charts";
import * as i3 from "@ionic/angular";
import * as i4 from "../../ui-directive/export-data.directive";
let TapVariableGaugeComponent = class TapVariableGaugeComponent extends GaugeCardComponent {
    /**
     * @deprecated directly use value input
     */
    set variable(v) {
        if (v) {
            this.inputStream = v.values;
        }
        else {
            this.inputStream = NEVER;
        }
    }
    set value(value) {
        this.setSingleValue(value);
    }
};
/** @nocollapse */ TapVariableGaugeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TapVariableGaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ TapVariableGaugeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TapVariableGaugeComponent, selector: "tap-variable-gauge", inputs: { variable: "variable", value: "value" }, 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\"\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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.GaugeComponent, selector: "ngx-charts-gauge", inputs: ["legend", "legendTitle", "legendPosition", "min", "max", "textValue", "units", "bigSegments", "smallSegments", "results", "showAxis", "startAngle", "angleSpan", "activeEntries", "axisTickFormatting", "tooltipDisabled", "valueFormatting", "showText", "margin"], outputs: ["activate", "deactivate"] }, { kind: "component", type: i3.IonFabButton, selector: "ion-fab-button", inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"] }, { kind: "component", type: i3.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "directive", type: i4.ExportDataDirective, selector: "[tapExportData]", inputs: ["exportedFileName", "dataToExport", "format"], outputs: ["exportDataError"] }] });
TapVariableGaugeComponent = __decorate([
    MonitoringAppGenComponent({
        constraints: {
            isNumber: 'YES',
        },
    })
], TapVariableGaugeComponent);
export { TapVariableGaugeComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", 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\"\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
            }], value: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwLXZhcmlhYmxlLWdhdWdlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2lvdGl6ZS1pb25pYy9tb25pdG9yaW5nL3NyYy9saWIvdWktY29tcG9uZW50cy90YXAtdmFyaWFibGUtZ2F1Z2UvdGFwLXZhcmlhYmxlLWdhdWdlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2lvdGl6ZS1pb25pYy9tb25pdG9yaW5nL3NyYy9saWIvdWktY29tcG9uZW50cy9nYXVnZS1jYXJkL2dhdWdlLWNhcmQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRWpELE9BQU8s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