"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 _react = _interopRequireDefault(require("react"));

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

var _island = _interopRequireDefault(require("../island"));

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

var _excluded = ["children", "className", "size"];
var PADDING_VERTICAL = {
  small: 1,
  medium: 2,
  large: 3
};

var Header = function Header(_ref) {
  var children = _ref.children,
      className = _ref.className,
      size = _ref.size,
      others = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  var classNames = (0, _classnames.default)(_theme.default["is-".concat(size)], className);
  return /*#__PURE__*/_react.default.createElement(_island.default, (0, _extends2.default)({}, others, {
    alignItems: "center",
    className: classNames,
    display: "flex",
    size: size,
    paddingVertical: PADDING_VERTICAL[size]
  }), children);
};

var _default = Header;
exports.default = _default;