"use strict";

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

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

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _semanticHeader = require("./semantic-header.css-rules");

var _mapping;

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

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

/**
 * Internal component used to implement the semantic-header-level mixin.
 */
var UnstyledH1 = _styledComponents["default"].h1.withConfig({
  displayName: "UnstyledH1",
  componentId: "v7dpfv-0"
})(["", ""], _semanticHeader.presentation);

var UnstyledH2 = _styledComponents["default"].h2.withConfig({
  displayName: "UnstyledH2",
  componentId: "v7dpfv-1"
})(["", ""], _semanticHeader.presentation);

var UnstyledH3 = _styledComponents["default"].h3.withConfig({
  displayName: "UnstyledH3",
  componentId: "v7dpfv-2"
})(["", ""], _semanticHeader.presentation);

var UnstyledH4 = _styledComponents["default"].h4.withConfig({
  displayName: "UnstyledH4",
  componentId: "v7dpfv-3"
})(["", ""], _semanticHeader.presentation);

var UnstyledH5 = _styledComponents["default"].h5.withConfig({
  displayName: "UnstyledH5",
  componentId: "v7dpfv-4"
})(["", ""], _semanticHeader.presentation);

var UnstyledH6 = _styledComponents["default"].h6.withConfig({
  displayName: "UnstyledH6",
  componentId: "v7dpfv-5"
})(["", ""], _semanticHeader.presentation);

var UnstyledHNone = _styledComponents["default"].div.withConfig({
  displayName: "UnstyledHNone",
  componentId: "v7dpfv-6"
})(["", ""], _semanticHeader.presentation);

var mapping = (_mapping = {}, _defineProperty(_mapping, String(1), UnstyledH1), _defineProperty(_mapping, String(2), UnstyledH2), _defineProperty(_mapping, String(3), UnstyledH3), _defineProperty(_mapping, String(4), UnstyledH4), _defineProperty(_mapping, String(5), UnstyledH5), _defineProperty(_mapping, String(6), UnstyledH6), _defineProperty(_mapping, "none", UnstyledHNone), _mapping);

var SemanticHeader = function SemanticHeader(_ref) {
  var headerLevel = _ref.headerLevel,
      props = _objectWithoutProperties(_ref, ["headerLevel"]);

  var Component = mapping[headerLevel];
  return /*#__PURE__*/_react["default"].createElement(Component, props);
};

exports.SemanticHeader = SemanticHeader;
SemanticHeader.displayName = 'SemanticHeader';