import React from 'react';
import cx from 'classnames';

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

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

  return /*#__PURE__*/React.createElement("section", {
    className: classes
  }, /*#__PURE__*/React.createElement("div", {
    className: "block-bg"
  }), /*#__PURE__*/React.createElement("div", {
    className: "block-effect"
  }), /*#__PURE__*/React.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;
export { LayoutWrapper as Layout };