import{a as O}from"./chunk-YAXVE3V7.mjs";import{a as h}from"./chunk-CIROWHZJ.mjs";import{a as b}from"./chunk-YXBUSSMP.mjs";import{a as d}from"./chunk-JHNTUQIY.mjs";import{useCurrentProfile as E}from"@baseapp-frontend/authentication";import{Divider as F}from"@mui/material";import{jsx as n,Fragment as w,jsxs as C}from"react/jsx-runtime";function i(r){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(r)}function S(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),o.push.apply(o,t)}return o}function j(r){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?S(Object(o),!0).forEach(function(t){x(r,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):S(Object(o)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(o,t))})}return r}function x(r,e,o){return(e=U(e))in r?Object.defineProperty(r,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[e]=o,r}function U(r){var e=L(r,"string");return i(e)=="symbol"?e:e+""}function L(r,e){if(i(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var t=o.call(r,e||"default");if(i(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var K=function(e){var o,t=e.CurrentUser,u=t===void 0?O:t,a=e.CurrentProfile,p=a===void 0?b:a,c=e.SwitchProfileMenu,f=c===void 0?d:c,m=e.SwitchProfileMenuProps,M=m===void 0?{}:m,P=e.MenuItems,g=P===void 0?h:P,v=e.MenuItemsProps,l=v===void 0?{}:v,D=e.handlePopoverOnClose,I=e.setOpenProfilesList,_=E({noSSR:!1}),B=_.currentProfile,s=!!p&&!!B,y=!s&&!!u,$=!!(s||y||f);return C(w,{children:[s&&n(p,{}),y&&n(u,{}),s&&!!f&&n(f,j({openProfilesList:function(){return I(!0)}},M)),!!(!(l==null||(o=l.menuItems)===null||o===void 0)&&o.length)&&C(w,{children:[$&&n(F,{sx:{borderStyle:"solid"}}),n(g,j({handlePopoverOnClose:D},l))]})]})},G=K;export{G as a};
//# sourceMappingURL=chunk-3BRG5XI3.mjs.map