import { jsx as a } from "react/jsx-runtime";
import { Box as o, Avatar as f } from "@mui/material";
import u from "../Avatar/index.js";
import { createNameOnlyAvatar as x } from "./utils.js";
const N = (r, t = 48, c = void 0, e = void 0, l = !1) => {
  const n = (i) => {
    e?.(r, i);
  };
  if (!r.avatar) {
    const i = x(r), { className: s, style: d, alt: m } = c || {};
    return /* @__PURE__ */ a(
      f,
      {
        onClick: n,
        className: s,
        style: d,
        alt: m,
        sx: {
          width: t,
          height: t,
          fontSize: t * 0.4,
          cursor: l || e ? "pointer" : "default"
        },
        variant: "circular",
        children: i
      }
    );
  }
  return /* @__PURE__ */ a(
    o,
    {
      className: "user-card__avatar",
      sx: {
        display: "flex"
      },
      children: /* @__PURE__ */ a(
        u,
        {
          size: t,
          did: r.did,
          variant: "circle",
          useProxyFallback: !0,
          style: {
            cursor: l || e ? "pointer" : "default"
          },
          onClick: n,
          src: r.avatar,
          alt: r.fullName || "",
          ...c || {}
        }
      )
    }
  );
}, _ = (r, t = 120) => r ? /* @__PURE__ */ a(o, { sx: { maxWidth: t }, className: "user-card__top-right-content", children: r() }) : null;
export {
  N as renderAvatar,
  _ as renderTopRight
};
