"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 ionic_angular_1 = require("ionic-angular");
const master_detail_nav_service_1 = require("../../master-detail-nav.service");
const detail_1 = require("../detail/detail");
const AbstractMasterPage_1 = require("../AbstractMasterPage");
let MasterPage = class MasterPage extends AbstractMasterPage_1.AbstractMasterPage {
    constructor(navParams, navProxy) {
        super();
        this.navParams = navParams;
        this.navProxy = navProxy;
        this.items = navParams.get('items');
    }
    onItemSelected(item) {
        this.navProxy.pushDetail(detail_1.DetailPage, { addToNavStack: true, item });
    }
};
MasterPage = __decorate([
    ionic_angular_1.IonicPage(),
    core_1.Component({
        selector: 'jsonforms-master-detail-master',
        template: `
      <ion-content>
          <ion-list>
              <button ion-item *ngFor="let item of items" (click)="onItemSelected(item)">
                  <h2>
                      {{ item.label }}
                  </h2>
              </button>
          </ion-list>
      </ion-content>
  `
    }),
    __metadata("design:paramtypes", [ionic_angular_1.NavParams,
        master_detail_nav_service_1.MasterDetailNavService])
], MasterPage);
exports.MasterPage = MasterPage;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL290aGVyL21hc3Rlci1kZXRhaWwvcGFnZXMv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