"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
exports.__esModule = true;
exports["default"] = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _react = _interopRequireDefault(require("react"));
var _Heading = _interopRequireWildcard(require("../../Heading"));
var _MarketingLayoutSt = require("../MarketingLayout.st.css.js");
var _StringUtils = require("../../utils/StringUtils");
var _dataHooks = require("../dataHooks");
var _constants = require("../constants");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/MarketingLayout/components/Title.jsx",
  _this = void 0;
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var sizeToHeadingSize = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _constants.SIZES.small, _Heading.SIZE.MEDIUM), _constants.SIZES.medium, _Heading.SIZE.LARGE), _constants.SIZES.large, _Heading.SIZE.LARGE);
var Title = function Title(_ref) {
  var children = _ref.children,
    size = _ref.size;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: _MarketingLayoutSt.classes.title,
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 14,
      columnNumber: 3
    }
  }, (0, _StringUtils.isString)(children) ? size === _constants.SIZES.tiny ? /*#__PURE__*/_react["default"].createElement("div", {
    "data-hook": _dataHooks.MARKETING_LAYOUT_TITLE,
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 17,
      columnNumber: 9
    }
  }, children) : /*#__PURE__*/_react["default"].createElement(_Heading["default"], {
    dataHook: _dataHooks.MARKETING_LAYOUT_TITLE,
    size: sizeToHeadingSize[size],
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 19,
      columnNumber: 9
    }
  }, children) : /*#__PURE__*/_react["default"].createElement("div", {
    "data-hook": _dataHooks.MARKETING_LAYOUT_TITLE,
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 27,
      columnNumber: 7
    }
  }, children));
};
var _default = exports["default"] = Title;