import{a as j}from"./chunk-RGSVGRRX.mjs";import{forwardRef as W}from"react";import{ChevronIcon as P}from"@baseapp-frontend/design-system/components/web/icons";import{Box as a,Link as x,Tooltip as K}from"@mui/material";import{jsx as o,jsxs as w}from"react/jsx-runtime";function l(e){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(e)}var I=["itemData","open","depth","active","hasChild"];function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(r){C(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){var t=k(e,"string");return l(t)=="symbol"?t:t+""}function k(e,t){if(l(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(l(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $(e,t){if(e==null)return{};var n,r,i=L(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function L(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var T=W(function(e,t){var n=e.itemData,r=n.title,i=n.path,c=i===void 0?"":i,p=n.icon,b=n.info,u=n.disabled,f=n.caption,d=n.externalLink,S=d===void 0?!1:d,h=e.open,y=e.depth,D=e.active,v=e.hasChild,N=$(e,I),O=y!==1,_=function(){return v?h?o(P,{}):o(P,{position:"right"}):null},m=w(j,s(s({ref:t,disableGutters:!0,open:h,depth:y,active:D,disabled:u},N),{},{children:[!O&&p&&o(a,{component:"span",className:"icon",children:p}),O&&p?o(a,{component:"span",className:"icon",children:p}):o(a,{component:"span",className:"sub-icon"}),r&&w(a,{component:"span",sx:{flex:"1 1 auto",minWidth:0},children:[o(a,{component:"span",className:"label",children:r}),f&&o(K,{title:f,placement:"top-start",children:o(a,{component:"span",className:"caption",children:f})})]}),b&&o(a,{component:"span",className:"info",children:b}),_()]}));return v?m:S?o(x,{href:c,target:"_blank",rel:"noopener",color:"inherit",underline:"none",sx:s({},u&&{pointerEvents:"none"}),children:m}):o(x,{href:c,color:"inherit",underline:"none",sx:s({},u&&{pointerEvents:"none"}),children:m})}),F=T;export{F as a};
//# sourceMappingURL=chunk-MMAGRUPG.mjs.map