"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
exports.__esModule = true;
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireWildcard(require("react"));
var _SidebarNextContext = require("../SidebarNext/SidebarNextContext");
var _ContextMenu = require("./components/ContextMenu");
var _AccordionMenu = require("./components/AccordionMenu");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/SidebarSubMenuNext/SidebarSubMenuNext.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 SidebarSubMenuNext = function SidebarSubMenuNext(props) {
  var context = (0, _react.useContext)(_SidebarNextContext.SidebarNextContext);
  if ((context == null ? void 0 : context.parent) === 'inContextMenu') {
    return /*#__PURE__*/_react["default"].createElement(_ContextMenu.ContextMenu, (0, _extends2["default"])({}, props, {
      __self: _this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 10,
        columnNumber: 12
      }
    }));
  }
  return /*#__PURE__*/_react["default"].createElement(_AccordionMenu.AccordionMenu, (0, _extends2["default"])({}, props, {
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 13,
      columnNumber: 10
    }
  }));
};
SidebarSubMenuNext.displayName = 'SidebarSubMenuNext';
var _default = exports["default"] = SidebarSubMenuNext;