"use strict";

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

var _react = _interopRequireDefault(require("react"));

var _eshopw = _interopRequireDefault(require("./eshopw"));

var _um = _interopRequireDefault(require("./um"));

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

function index(props) {
  // 要求每一个定制化的项目提供自己的唯一名称，用来区分不同项目特有的需求，默认为 eshopw
  var project = window.MParams && window.MParams.project ? window.MParams.project : 'eshopw';
  var showCot = props.showCot;

  var renderLayout = function renderLayout() {
    var layout = {
      eshopw: /*#__PURE__*/_react["default"].createElement(_eshopw["default"], {
        showCot: showCot
      }, props.children),
      um: /*#__PURE__*/_react["default"].createElement(_um["default"], {
        showCot: showCot
      }, props.children)
    };
    return layout[project] || /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, props.children);
  };

  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, renderLayout());
}