"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _react = _interopRequireDefault(require("react"));
var _SidebarSectionTitleSt = require("./SidebarSectionTitle.st.css.js");
var _Text = _interopRequireDefault(require("../Text"));
var _SidebarAPI = require("../Sidebar/SidebarAPI");
var _constants = require("../Sidebar/constants");
var _context = require("../WixDesignSystemProvider/context");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/SidebarSectionTitle/SidebarSectionTitle.jsx";
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
/** A title for the section within the sidebar */
var SidebarSectionTitle = /*#__PURE__*/function (_React$PureComponent) {
  function SidebarSectionTitle() {
    (0, _classCallCheck2["default"])(this, SidebarSectionTitle);
    return _callSuper(this, SidebarSectionTitle, arguments);
  }
  (0, _inherits2["default"])(SidebarSectionTitle, _React$PureComponent);
  return (0, _createClass2["default"])(SidebarSectionTitle, [{
    key: "render",
    value: function render() {
      var _this = this;
      var _this$props = this.props,
        dataHook = _this$props.dataHook,
        children = _this$props.children;
      return /*#__PURE__*/_react["default"].createElement(_context.WixDesignSystemContext.Consumer, {
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 15,
          columnNumber: 7
        }
      }, function () {
        return /*#__PURE__*/_react["default"].createElement(_SidebarAPI.SidebarContext.Consumer, {
          __self: _this,
          __source: {
            fileName: _jsxFileName,
            lineNumber: 17,
            columnNumber: 11
          }
        }, function (context) {
          var skin = context && context.getSkin() || _constants.sidebarSkins.dark;
          return /*#__PURE__*/_react["default"].createElement(_Text["default"], {
            dataHook: dataHook,
            className: (0, _SidebarSectionTitleSt.st)(_SidebarSectionTitleSt.classes.root, {
              skin: skin
            }),
            size: "tiny",
            weight: "bold",
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 22,
              columnNumber: 17
            }
          }, children);
        });
      });
    }
  }]);
}(_react["default"].PureComponent);
SidebarSectionTitle.displayName = 'SidebarSectionTitle';
var _default = exports["default"] = SidebarSectionTitle;