"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 _spacing = require("../../../mixins/spacing");

var _stackee = require("../../../mixins/stackee");

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

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

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

var SectionHeaderLarge = _styledComponents["default"].h2.attrs(sharedAttributes).withConfig({
  displayName: "SectionHeaderLarge",
  componentId: "sc-1cg6vne-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, _spacing.getSpacingRules, _stackee.getStackeeRules);

SectionHeaderLarge.displayName = 'SectionHeaderLarge';

var SectionHeaderSmall = _styledComponents["default"].h3.attrs(sharedAttributes).withConfig({
  displayName: "SectionHeaderSmall",
  componentId: "sc-1cg6vne-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, _spacing.getSpacingRules, _stackee.getStackeeRules);

SectionHeaderSmall.displayName = 'SectionHeaderSmall';

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

  switch (size) {
    case 'lg':
      return /*#__PURE__*/_react["default"].createElement(SectionHeaderLarge, _extends({
        spacing: spacing,
        grow: grow,
        shrink: shrink,
        basis: basis
      }, {
        size: size,
        className: className
      }), children);

    case 'sm':
      return /*#__PURE__*/_react["default"].createElement(SectionHeaderSmall, _extends({
        spacing: spacing,
        grow: grow,
        shrink: shrink,
        basis: basis
      }, {
        size: size,
        className: className
      }), children);

    default:
      return /*#__PURE__*/_react["default"].createElement(SectionHeaderLarge, _extends({
        spacing: spacing,
        grow: grow,
        shrink: shrink,
        basis: basis
      }, {
        size: size,
        className: className
      }), children);
  }
};

exports.SectionHeader = SectionHeader;
SectionHeader.displayName = 'SectionHeader';