"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _lodash = _interopRequireDefault(require("lodash"));

var RouteExample = [{
  title: "",
  url: "",
  assets: {
    css: [],
    js: []
  },
  component: "",
  data: {}
}];

var route =
/**
 *
 * @param {Array}RouteMaps
 */
function route(AppEngine, RouteMaps) {
  (0, _classCallCheck2["default"])(this, route);

  /**
   *
   * @type {Object}
   */
  this.RouteMaps = _lodash["default"].extend([{
    title: "",
    url: "",
    assets: {
      css: [],
      js: []
    },
    component: "",
    data: {}
  }], RouteMaps);
  this.RouteMaps.forEach(function (object) {
    AppEngine.get(object.url !== undefined ? object.url : "/", function (request, response) {
      response.view(object.component !== undefined ? object.component : "", object.data !== undefined ? object.data : {});
    });
  });
};

var _default = route;
exports["default"] = _default;
//# sourceMappingURL=route.example.js.map