import { __decorate, __metadata } from "tslib";
import { Component, Input } from '@angular/core';
import { AppGenField, MonitoringAppGenComponent, } from '../../metadata/decorators';
import * as i0 from "@angular/core";
import * as i1 from "@iotize/ionic";
import * as i2 from "../monitoring-range/monitoring-range.component";
import * as i3 from "@ionic/angular";
import * as i4 from "@angular/common";
let TapVariableRangeComponent = class TapVariableRangeComponent {
    constructor() {
        this.editable = true;
        this.min = 0;
        this.max = 100;
        this.step = 1;
        this.pin = true;
        this.snaps = true;
        this.ticks = true;
        this.debounce = 0;
    }
    set variable(variable) {
        this._variable = variable;
    }
};
/** @nocollapse */ /** @nocollapse */ TapVariableRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TapVariableRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ /** @nocollapse */ TapVariableRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TapVariableRangeComponent, selector: "tap-variable-range", inputs: { variable: "variable", editable: "editable", min: "min", max: "max", step: "step", pin: "pin", snaps: "snaps", ticks: "ticks", debounce: "debounce" }, ngImport: i0, template: "<tap-value-editor-container *ngIf=\"_variable\" #ctx [variable]=\"_variable\">\n  <monitoring-range\n    [disabled]=\"!editable || (ctx.loadingChange | async)\"\n    [inputStream]=\"ctx.valueToDisplay\"\n    [ticks]=\"ticks\"\n    [pin]=\"pin\"\n    [snaps]=\"snaps\"\n    [max]=\"max\"\n    [min]=\"min\"\n    [step]=\"step\"\n    style=\"width: 100%\"\n    (onValueChanged)=\"ctx.notifyValueChange($event)\"\n  >\n    <ng-template monitoringRangeContent>\n      <ion-label slot=\"start\">{{ min }}</ion-label>\n      <ion-label slot=\"end\">{{ max }}</ion-label>\n    </ng-template>\n  </monitoring-range>\n</tap-value-editor-container>\n", styles: [""], components: [{ type: i1.TapValueEditorContainerComponent, selector: "tap-value-editor-container", inputs: ["variable", "showRefreshButton", "showSubmitButton", "showEditButton", "error", "lines"] }, { type: i2.MonitoringRangeComponent, selector: "monitoring-range", inputs: ["inputStream", "min", "max", "step", "debounce", "pin", "disabled", "snaps", "ticks", "color"], outputs: ["onValueChanged"] }, { type: i3.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MonitoringRangeContentDirective, selector: "[monitoringRangeContent]" }], pipes: { "async": i4.AsyncPipe } });
__decorate([
    AppGenField({
        schema: {
            type: 'boolean',
        },
    }),
    __metadata("design:type", Object)
], TapVariableRangeComponent.prototype, "editable", void 0);
__decorate([
    AppGenField({
        schema: {
            type: 'number',
            default: 0,
            description: 'Minimum value of the range.',
        },
    }),
    __metadata("design:type", Object)
], TapVariableRangeComponent.prototype, "min", void 0);
__decorate([
    AppGenField({
        schema: {
            type: 'number',
            default: 100,
            description: 'Maximum value of the range.',
        },
    }),
    __metadata("design:type", Object)
], TapVariableRangeComponent.prototype, "max", void 0);
__decorate([
    AppGenField({
        schema: {
            type: 'number',
            description: 'Specifies the value granularity.',
            default: 1,
        },
    }),
    __metadata("design:type", Object)
], TapVariableRangeComponent.prototype, "step", void 0);
__decorate([
    AppGenField({
        schema: {
            type: 'boolean',
            default: true,
            description: `Show pin above slider with currently selected value\n
         It's only available for integer values (float values will be rounded).`,
        },
    }),
    __metadata("design:type", Object)
], TapVariableRangeComponent.prototype, "pin", void 0);
__decorate([
    AppGenField({
        schema: {
            type: 'boolean',
            default: true,
            description: 'If true, the knob snaps to tick marks evenly spaced based on the step property value.',
        },
    }),
    __metadata("design:type", Object)
], TapVariableRangeComponent.prototype, "snaps", void 0);
__decorate([
    AppGenField({
        schema: {
            type: 'boolean',
            default: true,
            description: 'If true, tick marks are displayed based on the step value. Only applies when snaps is true.',
        },
    }),
    __metadata("design:type", Object)
], TapVariableRangeComponent.prototype, "ticks", void 0);
__decorate([
    AppGenField({
        schema: {
            type: 'integer',
            default: 0,
            description: 'How long, in milliseconds, to wait to trigger the change event after each change in the range value.',
        },
    }),
    __metadata("design:type", Object)
], TapVariableRangeComponent.prototype, "debounce", void 0);
TapVariableRangeComponent = __decorate([
    MonitoringAppGenComponent({
        constraints: {
            isArray: 'YES',
            isNumber: 'YES',
        },
    }),
    __metadata("design:paramtypes", [])
], TapVariableRangeComponent);
export { TapVariableRangeComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TapVariableRangeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'tap-variable-range', template: "<tap-value-editor-container *ngIf=\"_variable\" #ctx [variable]=\"_variable\">\n  <monitoring-range\n    [disabled]=\"!editable || (ctx.loadingChange | async)\"\n    [inputStream]=\"ctx.valueToDisplay\"\n    [ticks]=\"ticks\"\n    [pin]=\"pin\"\n    [snaps]=\"snaps\"\n    [max]=\"max\"\n    [min]=\"min\"\n    [step]=\"step\"\n    style=\"width: 100%\"\n    (onValueChanged)=\"ctx.notifyValueChange($event)\"\n  >\n    <ng-template monitoringRangeContent>\n      <ion-label slot=\"start\">{{ min }}</ion-label>\n      <ion-label slot=\"end\">{{ max }}</ion-label>\n    </ng-template>\n  </monitoring-range>\n</tap-value-editor-container>\n", styles: [""] }]
        }], ctorParameters: function () { return []; }, propDecorators: { variable: [{
                type: Input
            }], editable: [{
                type: Input
            }], min: [{
                type: Input
            }], max: [{
                type: Input
            }], step: [{
                type: Input
            }], pin: [{
                type: Input
            }], snaps: [{
                type: Input
            }], ticks: [{
                type: Input
            }], debounce: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 