"use strict";

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

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

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

var _semanticHeaderLevel = require("../../../mixins/semantic-header-level");

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); }

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; }

var StyledSemanticHeader = (0, _styledComponents["default"])(_semanticHeaderLevel.SemanticHeader).withConfig({
  displayName: "StyledSemanticHeader",
  componentId: "uojxys-0"
})(["line-height:1.2;"]);

var PageTitle = function PageTitle(_ref) {
  var children = _ref.children,
      className = _ref.className,
      _ref$spacing = _ref.spacing,
      spacing = _ref$spacing === void 0 ? 'pv5' : _ref$spacing,
      grow = _ref.grow,
      shrink = _ref.shrink,
      basis = _ref.basis,
      _ref$headerLevel = _ref.headerLevel,
      headerLevel = _ref$headerLevel === void 0 ? 1 : _ref$headerLevel,
      dataQa = _ref['data-qa'],
      dataCy = _ref['data-cy'],
      id = _ref.id,
      props = _objectWithoutProperties(_ref, ["children", "className", "spacing", "grow", "shrink", "basis", "headerLevel", "data-qa", "data-cy", "id"]);

  return /*#__PURE__*/_react["default"].createElement(StyledSemanticHeader, _extends({
    spacing: spacing,
    grow: grow,
    shrink: shrink,
    basis: basis,
    className: className,
    id: id,
    headerLevel: headerLevel
  }, {
    "data-cy": dataCy,
    "data-qa": dataQa,
    fontSize: "f5",
    bold: true,
    colorName: "greyscale-black"
  }, props), children);
};

exports.PageTitle = PageTitle;
PageTitle.displayName = 'PageTitle';