"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("@jsonforms/core");
const core_2 = require("@angular/core");
const store_1 = require("@angular-redux/store");
const JsonFormsIonicLayout_1 = require("../JsonFormsIonicLayout");
let GroupLayoutRenderer = class GroupLayoutRenderer extends JsonFormsIonicLayout_1.JsonFormsIonicLayout {
    constructor(ngRedux) {
        super(ngRedux);
    }
    ngOnInit() {
        const ownProps = this.getOwnProps();
        const state$ = this.connectLayoutToJsonForms(this.ngRedux, ownProps);
        this.subscription = state$.subscribe(state => {
            this.stateProps = state;
            this.label = ownProps.uischema.label;
        });
    }
};
GroupLayoutRenderer = __decorate([
    core_2.Component({
        selector: 'jsonforms-group-layout',
        template: `
      <ion-card>
          <ion-card-header>
              {{label}}
          </ion-card-header>
          <ion-card-content>
              <div *ngFor="let uischema of stateProps.uischema.elements">
                  <jsonforms-outlet
                          [uischema]="uischema"
                          [path]="path"
                          [schema]="schema"
                  ></jsonforms-outlet>
              </div>
          </ion-card-content>
      </ion-card>

  `
    }),
    __metadata("design:paramtypes", [store_1.NgRedux])
], GroupLayoutRenderer);
exports.GroupLayoutRenderer = GroupLayoutRenderer;
exports.groupTester = core_1.rankWith(1, core_1.uiTypeIs('Group'));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JvdXAtbGF5b3V0Lmpz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