"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@angular/core");
const store_1 = require("@angular-redux/store");
const core_2 = require("@jsonforms/core");
const angular_1 = require("@jsonforms/angular");
let NumberControlRenderer = class NumberControlRenderer extends angular_1.JsonFormsControl {
    constructor(ngRedux) {
        super(ngRedux);
    }
    ngOnInit() {
        super.ngOnInit();
        this.min = this.scopedSchema.minimum || null;
        this.max = this.scopedSchema.maximum || null;
        this.multipleOf = this.scopedSchema.multipleOf || null;
    }
};
NumberControlRenderer = __decorate([
    core_1.Component({
        selector: 'jsonforms-number-control',
        template: `
      <ion-item>
          <ion-label floating>{{label}}</ion-label>
          <ion-input
                  type="number"
                  placeholder="{{ description }}"
                  [min]="min"
                  [max]="max"
                  [step]="multipleOf"
                  [value]="value"
                  (ionChange)="onChange($event)"
          >
          </ion-input>
      </ion-item>
  `
    }),
    __metadata("design:paramtypes", [store_1.NgRedux])
], NumberControlRenderer);
exports.NumberControlRenderer = NumberControlRenderer;
exports.numberControlTester = core_2.rankWith(2, core_2.isNumberControl);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLWNvbnRyb2wuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvY29udHJvbHMvbnVtYmVyL251bWJlci1jb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