"use strict";

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

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

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

var _sectionHeader = require("./section-header.css-rules");

var _branding = require("../../../mixins/branding");

var _typography = require("../../../mixins/typography");

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

var sharedAttributes = {
  face: 'sans',
  bold: 'true'
};

var SectionHeaderLarge = _styledComponents["default"].h2.attrs(sharedAttributes).withConfig({
  displayName: "SectionHeaderLarge",
  componentId: "sfi6mv-0"
})(["color:", ";font-size:", ";font-family:", ";font-weight:", ";line-height:1.2;margin-top:0px;margin-bottom:20px;"], (0, _branding.getPaletteColor)('greyscale-dark'), _sectionHeader.getHeaderFontSize, _typography.getFontFamily, _typography.getFontWeight);

SectionHeaderLarge.displayName = 'SectionHeaderLarge';

var SectionHeaderSmall = _styledComponents["default"].h3.attrs(sharedAttributes).withConfig({
  displayName: "SectionHeaderSmall",
  componentId: "sfi6mv-1"
})(["color:", ";font-size:", ";font-family:", ";font-weight:", ";line-height:1.2;margin-top:0px;margin-bottom:10px;"], (0, _branding.getPaletteColor)('greyscale-dark'), _sectionHeader.getHeaderFontSize, _typography.getFontFamily, _typography.getFontWeight);

SectionHeaderSmall.displayName = 'SectionHeaderSmall';

var SectionHeader = function SectionHeader(_ref) {
  var children = _ref.children,
      _ref$size = _ref.size,
      size = _ref$size === void 0 ? 'lg' : _ref$size;

  switch (size) {
    case 'lg':
      return _react["default"].createElement(SectionHeaderLarge, {
        size: size
      }, children);

    case 'sm':
      return _react["default"].createElement(SectionHeaderSmall, {
        size: size
      }, children);

    default:
      return _react["default"].createElement(SectionHeaderLarge, {
        size: size
      }, children);
  }
};

exports.SectionHeader = SectionHeader;