import { jsxs as i, jsx as t } from "react/jsx-runtime";
import { useMemo as l } from "react";
import { BaseAvatar as c, AvatarImage as p, AvatarFallback as n } from "./AvatarPrimitive.js";
import f from "../../utils/getNameInitials.js";
import { shapeVariants as m } from "./types/ShapeVariant.js";
const A = (
  /**
   * @param props - Component props
   * @param ref - Forwarded ref
   */
  (({ ref: o, imageUrl: r, text: a, shape: s = "circle" }) => {
    const e = l(() => f(a), [a]);
    return /* @__PURE__ */ i(c, { ref: o, className: m[s], children: [
      r && /* @__PURE__ */ t(p, { src: r, alt: a || "N/A" }),
      /* @__PURE__ */ t(n, { className: m[s], children: e })
    ] });
  })
);
A.displayName = "Avatar";
export {
  A as default
};
//# sourceMappingURL=Avatar.js.map
