import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children", "className", "color", "size"];
import cx from 'classnames';
import React from 'react';
import Box from '../box';
import theme from './theme.css';
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 = _objectWithoutProperties(_ref, _excluded);

  var classNames = cx(theme['section'], className, theme[color]);
  return /*#__PURE__*/React.createElement(Box, _extends({
    "data-teamleader-ui": "section",
    className: classNames,
    element: "section",
    padding: PADDINGS[size]
  }, rest), children);
};

export default Section;