"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _Text = _interopRequireDefault(require("../Text"));
var _SectionHeaderSt = require("./SectionHeader.st.css.js");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/SectionHeader/SectionHeader.tsx";
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 SectionHeader = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
  var {
    dataHook,
    title,
    suffix,
    id,
    'aria-describedby': ariaDescribedBy,
    as = 'span',
    skin = 'standard',
    size = 'medium',
    align = 'start',
    divider = 'default',
    horizontalPadding = 'large'
  } = _ref;
  return /*#__PURE__*/_react.default.createElement("div", {
    ref: ref,
    "data-hook": dataHook,
    className: (0, _SectionHeaderSt.st)(_SectionHeaderSt.classes.root, {
      skin,
      horizontalPadding,
      divider,
      size
    }),
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 24,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: (0, _SectionHeaderSt.st)(_SectionHeaderSt.classes.title, {
      align,
      horizontalPadding
    }),
    "data-hook": "title-node",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 34,
      columnNumber: 9
    }
  }, /*#__PURE__*/(0, _react.isValidElement)(title) ? title : /*#__PURE__*/_react.default.createElement(_Text.default, {
    id: id,
    className: _SectionHeaderSt.classes.titleText,
    "aria-describedby": ariaDescribedBy,
    tagName: as,
    size: size,
    weight: "thin",
    flip: true,
    ellipsis: true,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 41,
      columnNumber: 13
    }
  }, title)), suffix && /*#__PURE__*/_react.default.createElement("div", {
    className: (0, _SectionHeaderSt.st)(_SectionHeaderSt.classes.suffix, {
      horizontalPadding
    }),
    "data-hook": "suffix-node",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 57,
      columnNumber: 11
    }
  }, suffix));
});
SectionHeader.displayName = 'SectionHeader';
var _default = exports.default = SectionHeader;
//# sourceMappingURL=SectionHeader.js.map