"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 core_2 = require("@jsonforms/core");
const store_1 = require("@angular-redux/store");
const angular_1 = require("@jsonforms/angular");
let StringControlRenderer = class StringControlRenderer extends angular_1.JsonFormsControl {
    constructor(ngRedux) {
        super(ngRedux);
    }
};
StringControlRenderer = __decorate([
    core_1.Component({
        selector: 'jsonforms-string-control',
        template: `
      <ion-item>
          <ion-label floating>{{label}}</ion-label>
          <!-- TODO: displays the actual error, question is where we want to actually display it -->
          <!-- TODO: needs to be added for other controls as well -->
          <ion-label stacked *ngIf="error" style="color: red">{{error}}</ion-label>
          <ion-input
                  type="text"
                  (ionChange)="onChange($event)"
                  [value]="value"
                  placeholder="{{ description }}"
                  [formControl]="form"
          >
          </ion-input>
      </ion-item>
  `
    }),
    __metadata("design:paramtypes", [store_1.NgRedux])
], StringControlRenderer);
exports.StringControlRenderer = StringControlRenderer;
exports.stringControlTester = core_2.rankWith(1, core_2.isControl);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nLWNvbnRyb2wuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvY29udHJvbHMvc3RyaW5nL3N0cmluZy1jb250cm9sLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsd0NBQTBDO0FBQzFDLDBDQUFvRjtBQUNwRixnREFBK0M7QUFDL0MsZ0RBQXNEO0FBcUJ0RCxJQUFhLHFCQUFxQixHQUFsQywyQkFBbUMsU0FBUSwwQkFBZ0I7SUFDekQsWUFBWSxPQUFnQztRQUMxQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7SUFDakIsQ0FBQztDQUNGLENBQUE7QUFKWSxxQkFBcUI7SUFuQmpDLGdCQUFTLENBQUM7UUFDVCxRQUFRLEVBQUUsMEJBQTBCO1FBQ3BDLFFBQVEsRUFBRTs7Ozs7Ozs7Ozs7Ozs7O0dBZVQ7S0FDRixDQUFDO3FDQUVxQixlQUFPO0dBRGpCLHFCQUFxQixDQUlqQztBQUpZLHNEQUFxQjtBQU1yQixRQUFBLG1CQUFtQixHQUFpQixlQUFRLENBQ3ZELENBQUMsRUFDRCxnQkFBUyxDQUNWLENBQUMifQ==