'use strict';

const dataModel = require('./data-model-9afb7f54.js');

exports.ViewPlacement = void 0;
(function (ViewPlacement) {
  ViewPlacement["Page"] = "page";
  ViewPlacement["SideModal"] = "side-modal";
  ViewPlacement["Dialog"] = "dialog";
})(exports.ViewPlacement || (exports.ViewPlacement = {}));
class AppConfig extends dataModel.DataModel {
  static decode(json) {
    return Object.assign(Object.create(AppConfig.prototype), json);
  }
  getView(viewId) {
    return this.views.find(view => view._id === viewId);
  }
  getHomeView() {
    var _a;
    if (this.mainNavigation.items.length === 0) {
      return undefined;
    }
    return this.getView((_a = this.mainNavigation.items[0]) === null || _a === void 0 ? void 0 : _a.viewId);
  }
}

exports.AppConfig = AppConfig;
