"use strict";

exports.__esModule = true;
exports.Layout = void 0;

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

var _classnames = _interopRequireDefault(require("classnames"));

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

var Layout = function Layout(_ref) {
  var background = _ref.background,
      dark = _ref.dark,
      header = _ref.header,
      children = _ref.children;
  var classes = (0, _classnames.default)('block ', dark && 'dark', background && "bg-" + background);

  var contentHeader = function contentHeader() {
    return header && /*#__PURE__*/_react.default.createElement("div", {
      className: "block-header"
    }, /*#__PURE__*/_react.default.createElement("h2", {
      className: "title"
    }, header));
  };

  return /*#__PURE__*/_react.default.createElement("section", {
    className: classes
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "block-bg"
  }), /*#__PURE__*/_react.default.createElement("div", {
    className: "block-effect"
  }), /*#__PURE__*/_react.default.createElement("div", {
    className: "inner"
  }, contentHeader(), children));
};

Layout.displayName = 'Layout';
var LayoutDoc;

if (process.env.NODE_ENV !== 'production') {
  // eslint-disable-next-line global-require
  LayoutDoc = require('./doc').doc(Layout);
}

var LayoutWrapper = LayoutDoc || Layout;
exports.Layout = LayoutWrapper;