"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _ContentSt = require("./Content.st.css.js");
var _constants = require("../../constants");
var _SidePanelAPI = require("../../SidePanelAPI");
var _useOverlayScrollbar = require("../../../providers/useOverlayScrollbar/useOverlayScrollbar");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/SidePanel/components/Content/Content.tsx";
var Content = _ref => {
  var {
    children,
    scrollElementRef,
    className,
    noPadding = false,
    stretchVertically = true
  } = _ref;
  var [OverlayScrollbarHostElement, OverlayScrollbarContentElement] = (0, _useOverlayScrollbar.useOverlayScrollbar)();
  return /*#__PURE__*/_react.default.createElement(_SidePanelAPI.SidePanelContext.Consumer, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 18,
      columnNumber: 5
    }
  }, _ref2 => {
    var {
      skin
    } = _ref2;
    return /*#__PURE__*/_react.default.createElement(OverlayScrollbarHostElement, {
      className: (0, _ContentSt.st)(_ContentSt.classes.root, {
        noPadding,
        stretchVertically,
        skin
      }, className),
      "data-hook": _constants.dataHooks.sidePanelContent,
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 20,
        columnNumber: 9
      }
    }, /*#__PURE__*/_react.default.createElement(OverlayScrollbarContentElement, {
      ref: scrollElementRef,
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 28,
        columnNumber: 11
      }
    }, children));
  });
};
var _default = exports.default = Content;
//# sourceMappingURL=Content.js.map