import { __decorate, __metadata } from "tslib";
import { Component, Input } from '@angular/core';
import { MonitoringAppGenComponent, AppGenField, } from '../../metadata/decorators';
import { MonitoringVariableValueComponent } from '../monitoring-variable-value/monitoring-variable-value.component';
import * as i0 from "@angular/core";
import * as i1 from "@iotize/ionic";
import * as i2 from "@angular/common";
let TapVariableNumberComponent = class TapVariableNumberComponent extends MonitoringVariableValueComponent {
    constructor() {
        super(...arguments);
        this.inputOptions = {
            type: 'number',
        };
    }
    set min(value) {
        this.inputOptions.min = value;
    }
    set max(value) {
        this.inputOptions.max = value;
    }
};
/** @nocollapse */ /** @nocollapse */ TapVariableNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: TapVariableNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ TapVariableNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: TapVariableNumberComponent, selector: "tap-variable-number", inputs: { min: "min", max: "max" }, usesInheritance: true, ngImport: i0, template: "<tap-value-editor-container\n  #ctx\n  [variable]=\"_variable\"\n  [showRefreshButton]=\"refreshable\"\n  [showEditButton]=\"editable\"\n  [showSubmitButton]=\"true\"\n  [lines]=\"lines\"\n>\n  <tap-inline-editor\n    *ngIf=\"_variable\"\n    [forceValue]=\"forceValue\"\n    [value]=\"\n      ctx.pendingSubmitValue === undefined ? value : ctx.pendingSubmitValue\n    \"\n    [editMode]=\"ctx.editModeChange | async\"\n    (editModeChange)=\"onEditModeChange($event)\"\n    [editable]=\"editable && ctx.pendingSubmitValue === undefined\"\n    [fieldError]=\"fieldError\"\n    [inputOptions]=\"inputOptions\"\n    [unitValue]=\"unitValue\"\n    [valueStyle]=\"valueStyle\"\n    (valueChange)=\"onValueChange($event)\"\n    (onSubmit)=\"onSubmit($event)\"\n  >\n  </tap-inline-editor>\n</tap-value-editor-container>\n", styles: [""], components: [{ type: i1.TapValueEditorContainerComponent, selector: "tap-value-editor-container", inputs: ["variable", "showRefreshButton", "showSubmitButton", "showEditButton", "error", "lines"] }, { type: i1.InlineEditorComponent, selector: "tap-inline-editor", inputs: ["editMode", "editable", "unitValue", "inputOptions", "valueStyle", "value", "forceValue", "showLoader", "fieldError"], outputs: ["onSubmit", "valueChange", "editModeChange"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i2.AsyncPipe } });
__decorate([
    AppGenField({
        schema: {
            type: 'integer',
            description: 'Minimum value',
        },
    }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], TapVariableNumberComponent.prototype, "min", null);
__decorate([
    AppGenField({
        schema: {
            type: 'integer',
            description: 'Maximum',
        },
    }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], TapVariableNumberComponent.prototype, "max", null);
TapVariableNumberComponent = __decorate([
    MonitoringAppGenComponent({
        constraints: {
            isArray: 'NO',
            isNumber: 'YES',
        },
    })
], TapVariableNumberComponent);
export { TapVariableNumberComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: TapVariableNumberComponent, decorators: [{
            type: Component,
            args: [{ selector: 'tap-variable-number', template: "<tap-value-editor-container\n  #ctx\n  [variable]=\"_variable\"\n  [showRefreshButton]=\"refreshable\"\n  [showEditButton]=\"editable\"\n  [showSubmitButton]=\"true\"\n  [lines]=\"lines\"\n>\n  <tap-inline-editor\n    *ngIf=\"_variable\"\n    [forceValue]=\"forceValue\"\n    [value]=\"\n      ctx.pendingSubmitValue === undefined ? value : ctx.pendingSubmitValue\n    \"\n    [editMode]=\"ctx.editModeChange | async\"\n    (editModeChange)=\"onEditModeChange($event)\"\n    [editable]=\"editable && ctx.pendingSubmitValue === undefined\"\n    [fieldError]=\"fieldError\"\n    [inputOptions]=\"inputOptions\"\n    [unitValue]=\"unitValue\"\n    [valueStyle]=\"valueStyle\"\n    (valueChange)=\"onValueChange($event)\"\n    (onSubmit)=\"onSubmit($event)\"\n  >\n  </tap-inline-editor>\n</tap-value-editor-container>\n", styles: [""] }]
        }], propDecorators: { min: [{
                type: Input
            }], max: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 