// tmp-babel/navigations/web/Header/AccountMenu/AccountPopover/CurrentUser/index.js
import { useJWTUser } from "@baseapp-frontend/authentication";
import { joinWithSeparator } from "@baseapp-frontend/utils";
import { Box, Typography } from "@mui/material";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var CurrentUser = function CurrentUser2() {
  var _useJWTUser = useJWTUser(), user = _useJWTUser.user;
  if (!user) {
    return null;
  }
  return /* @__PURE__ */ _jsxs(Box, {
    sx: {
      m: 1.5,
      px: 1,
      py: 0.75
    },
    children: [/* @__PURE__ */ _jsx(Typography, {
      component: "p",
      variant: "subtitle2",
      noWrap: true,
      children: joinWithSeparator([user === null || user === void 0 ? void 0 : user.firstName, user === null || user === void 0 ? void 0 : user.lastName])
    }), /* @__PURE__ */ _jsx(Typography, {
      variant: "body2",
      sx: {
        color: "text.secondary"
      },
      noWrap: true,
      children: user === null || user === void 0 ? void 0 : user.email
    })]
  });
};
var CurrentUser_default = CurrentUser;

export {
  CurrentUser_default
};
//# sourceMappingURL=chunk-O2URELIU.mjs.map