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: "14.3.0", ngImport: i0, type: TapVariableGaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ TapVariableGaugeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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: "14.3.0", 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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