"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _authentication = require('@baseapp-frontend/authentication');var _avatars = require('@baseapp-frontend/design-system/components/web/avatars');var _material = require('@mui/material');var _jsxruntime = require('react/jsx-runtime');var f=function(){var e,o,a=_authentication.useCurrentProfile.call(void 0, ),r=a.currentProfile;return r?_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{m:1.5,mb:0,px:1,py:.75,gap:1.5},display:"flex",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _avatars.AvatarWithPlaceholder,{width:40,height:40,src:(e=_optionalChain([r, 'optionalAccess', _ => _.image]))!==null&&e!==void 0?e:"",alt:"Current profile avatar",color:"secondary"}),_jsxruntime.jsxs.call(void 0, _material.Box,{display:"flex",flexDirection:"column",flexGrow:1,overflow:"hidden",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"p",variant:"subtitle2",noWrap:!0,children:r.name}),_optionalChain([r, 'optionalAccess', _2 => _2.urlPath])&&_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",sx:{color:"text.secondary"},noWrap:!0,children:r==null||(o=r.urlPath)===null||o===void 0?void 0:o.replace("/","")})]})]}):null},h= exports.a =f;exports.a = h;
//# sourceMappingURL=chunk-2IIS36RM.js.map