"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 _SidebarDividerSt = require("./SidebarDivider.st.css.js");
var _Divider = _interopRequireDefault(require("../Divider"));
var _SidebarAPI = require("../Sidebar/SidebarAPI");
var _constants = require("../Sidebar/constants");
var _Divider2 = require("../Divider/Divider.constants");
var _context = require("../WixDesignSystemProvider/context");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/SidebarDivider/SidebarDivider.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 divider within the sidebar that supports inner and full mode */
var SidebarDivider = /*#__PURE__*/function (_React$PureComponent) {
  function SidebarDivider() {
    (0, _classCallCheck2["default"])(this, SidebarDivider);
    return _callSuper(this, SidebarDivider, arguments);
  }
  (0, _inherits2["default"])(SidebarDivider, _React$PureComponent);
  return (0, _createClass2["default"])(SidebarDivider, [{
    key: "render",
    value: function render() {
      var _this = this;
      var _this$props = this.props,
        dataHook = _this$props.dataHook,
        fullWidth = _this$props.fullWidth;
      return /*#__PURE__*/_react["default"].createElement(_context.WixDesignSystemContext.Consumer, {
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 16,
          columnNumber: 7
        }
      }, function () {
        return /*#__PURE__*/_react["default"].createElement(_SidebarAPI.SidebarContext.Consumer, {
          __self: _this,
          __source: {
            fileName: _jsxFileName,
            lineNumber: 18,
            columnNumber: 11
          }
        }, function (context) {
          var skin = context && context.getSkin() || _constants.sidebarSkins.dark;
          return /*#__PURE__*/_react["default"].createElement("div", {
            "data-hook": dataHook,
            "data-full-width": fullWidth,
            className: (0, _SidebarDividerSt.st)(_SidebarDividerSt.classes.root, fullWidth ? _SidebarDividerSt.classes.fullWidth : ''),
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 23,
              columnNumber: 17
            }
          }, /*#__PURE__*/_react["default"].createElement(_Divider["default"], {
            skin: skin === _constants.sidebarSkins.light ? _Divider2.SKINS.light : _Divider2.SKINS.dark,
            className: _SidebarDividerSt.classes.divider,
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 31,
              columnNumber: 19
            }
          }));
        });
      });
    }
  }]);
}(_react["default"].PureComponent);
SidebarDivider.displayName = 'SidebarDivider';
var _default = exports["default"] = SidebarDivider;