"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

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

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

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

var PropTypes = _interopRequireWildcard(require("prop-types"));

var S = _interopRequireWildcard(require("./styles"));

var _MenuContainer = _interopRequireDefault(require("./MenuContainer"));

/**
 * 定义页面主体的内容结构。可以包含内容导航菜单，通过{@link IContentProps.menu | menu属性}传入。
 * @public
 */
var Content = function Content(_ref) {
  var className = _ref.className,
      style = _ref.style,
      _ref$adjustHeight = _ref.adjustHeight,
      adjustHeight = _ref$adjustHeight === void 0 ? 'consoleBaseTopbarRoot' : _ref$adjustHeight,
      menu = _ref.menu,
      children = _ref.children;
  return _react.default.createElement(S.Content, {
    className: className,
    style: style
  }, menu && _react.default.createElement(S.ContentSide, null, _react.default.createElement(_MenuContainer.default, {
    adjustHeight: adjustHeight
  }, menu)), _react.default.createElement(S.ContentMain, null, children));
};

Content.propTypes = {
  className: PropTypes.string,
  style: PropTypes.objectOf(PropTypes.any),
  menu: PropTypes.node,
  adjustHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
  children: PropTypes.node
};
var _default = Content;
exports.default = _default;