"use strict";

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

var _BasicLayout = _interopRequireDefault(require("../layouts/BasicLayout"));

var _UserLayout = _interopRequireDefault(require("../layouts/UserLayout"));

var _bootpage = _interopRequireDefault(require("../pages/bootpage"));

var _ = _interopRequireDefault(require("../pages/exception/404"));

var _2 = _interopRequireDefault(require("../pages/exception/500"));

var _login = _interopRequireDefault(require("../pages/user/login"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }

function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }

var dyRoutes = function dyRoutes(routes) {
  var dyRoutes = routes;
  return {
    routes: [{
      path: '/user',
      component: _UserLayout["default"],
      routes: [{
        name: 'login',
        path: '/user/login',
        component: _login["default"]
      }]
    }, {
      path: '/industry',
      component: _bootpage["default"]
    }, {
      path: '/',
      component: _BasicLayout["default"],
      routes: [].concat(_toConsumableArray(dyRoutes), [{
        path: '/404',
        component: _["default"]
      }, {
        path: '/500',
        component: _2["default"]
      }])
    }, {
      path: '/404',
      component: _["default"]
    }, {
      path: '/500',
      component: _2["default"]
    }]
  };
};

exports.dyRoutes = dyRoutes;