"use strict";

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

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

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

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

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

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

var _box = _interopRequireDefault(require("../box"));

var _theme = _interopRequireDefault(require("./theme.css"));

var _excluded = ["children", "className", "color", "size"];
var PADDINGS = {
  small: 3,
  medium: 4,
  large: 5
};

var Section = function Section(_ref) {
  var children = _ref.children,
      className = _ref.className,
      _ref$color = _ref.color,
      color = _ref$color === void 0 ? 'white' : _ref$color,
      _ref$size = _ref.size,
      size = _ref$size === void 0 ? 'medium' : _ref$size,
      rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  var classNames = (0, _classnames.default)(_theme.default['section'], className, _theme.default[color]);
  return /*#__PURE__*/_react.default.createElement(_box.default, (0, _extends2.default)({
    "data-teamleader-ui": "section",
    className: classNames,
    element: "section",
    padding: PADDINGS[size]
  }, rest), children);
};

var _default = Section;
exports.default = _default;