"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 EnumControlRenderer = class EnumControlRenderer extends angular_1.JsonFormsControl {
    constructor(ngRedux) {
        super(ngRedux);
    }
    ngOnInit() {
        super.ngOnInit();
        this.options = this.scopedSchema.enum;
    }
};
EnumControlRenderer = __decorate([
    core_1.Component({
        selector: 'jsonforms-enum-control',
        template: `
      <ion-item>
          <ion-label>{{label}}</ion-label>
          <ion-select [ngModel]="value" (ionChange)="onChange($event)">
              <ion-option *ngFor="let option of options" value="{{option}}">
                  {{option}}
              </ion-option>
          </ion-select>
      </ion-item>
  `
    }),
    __metadata("design:paramtypes", [store_1.NgRedux])
], EnumControlRenderer);
exports.EnumControlRenderer = EnumControlRenderer;
exports.enumControlTester = core_2.rankWith(2, core_2.isEnumControl);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW51bS1jb250cm9sLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2NvbnRyb2xzL2VudW0vZW51bS1jb250cm9sLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsd0NBQTBDO0FBQzFDLGdEQUErQztBQUMvQywwQ0FBd0Y7QUFDeEYsZ0RBQXNEO0FBZXRELElBQWEsbUJBQW1CLEdBQWhDLHlCQUFpQyxTQUFRLDBCQUFnQjtJQUl2RCxZQUFZLE9BQWdDO1FBQzFDLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUNqQixDQUFDO0lBRUQsUUFBUTtRQUNOLEtBQUssQ0FBQyxRQUFRLEVBQUUsQ0FBQztRQUNqQixJQUFJLENBQUMsT0FBTyxHQUFHLElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDO0lBQ3hDLENBQUM7Q0FDRixDQUFBO0FBWlksbUJBQW1CO0lBYi9CLGdCQUFTLENBQUM7UUFDVCxRQUFRLEVBQUUsd0JBQXdCO1FBQ2xDLFFBQVEsRUFBRTs7Ozs7Ozs7O0dBU1Q7S0FDRixDQUFDO3FDQUtxQixlQUFPO0dBSmpCLG1CQUFtQixDQVkvQjtBQVpZLGtEQUFtQjtBQWNuQixRQUFBLGlCQUFpQixHQUFpQixlQUFRLENBQ3JELENBQUMsRUFDRCxvQkFBYSxDQUNkLENBQUMifQ==