"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk7KPVTDCCjs = require('./chunk-7KPVTDCC.js');var _chunkWB2G4MNDjs = require('./chunk-WB2G4MND.js');var _react = require('react');var _Collapse = require('@mui/material/Collapse'); var _Collapse2 = _interopRequireDefault(_Collapse);var _navigation = require('next/navigation');var _jsxruntime = require('react/jsx-runtime');function c(t){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},c(t)}function d(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,n)}return e}function P(t){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?d(Object(e),!0).forEach(function(n){S(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):d(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function S(t,r,e){return(r=_(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function _(t){var r=w(t,"string");return c(r)=="symbol"?r:r+""}function w(t,r){if(c(t)!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var n=e.call(t,r||"default");if(c(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function A(t,r){return C(t)||T(t,r)||I(t,r)||x()}function x(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I(t,r){if(t){if(typeof t=="string")return v(t,r);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?v(t,r):void 0}}function v(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function T(t,r){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var n,o,s,i,u=[],a=!0,l=!1;try{if(s=(e=e.call(t)).next,r===0){if(Object(e)!==e)return;a=!1}else for(;!(a=(n=s.call(e)).done)&&(u.push(n.value),u.length!==r);a=!0);}catch(f){l=!0,o=f}finally{try{if(!a&&e.return!=null&&(i=e.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}function C(t){if(Array.isArray(t))return t}var g=function(r){var e=r.data,n=r.depth,o=r.slotProps,s=_navigation.usePathname.call(void 0, ),i=_chunkWB2G4MNDjs.a.call(void 0, _optionalChain([e, 'optionalAccess', _2 => _2.path]),!!e.children),u=_react.useState.call(void 0, i),a=A(u,2),l=a[0],f=a[1],j=_react.useCallback.call(void 0, function(){f(!1)},[]);_react.useEffect.call(void 0, function(){i||j()},[s]);var O=_react.useCallback.call(void 0, function(){e.children&&f(function(p){return!p})},[e.children]);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk7KPVTDCCjs.a,{open:l,onClick:O,depth:n,hasChild:!!e.children,active:i,itemData:e,className:i?"active":"",sx:P({mb:"".concat(_optionalChain([o, 'optionalAccess', _3 => _3.gap]),"px")},n===1?_optionalChain([o, 'optionalAccess', _4 => _4.rootItem]):_optionalChain([o, 'optionalAccess', _5 => _5.subItem]))}),!!e.children&&_jsxruntime.jsx.call(void 0, _Collapse2.default,{in:l,unmountOnExit:!0,children:e.children.map(function(p){return _jsxruntime.jsx.call(void 0, g,{data:p,depth:n+1,slotProps:o},p.title)})})]})},$= exports.a =g;exports.a = $;
//# sourceMappingURL=chunk-7NR4W5KD.js.map