import { jsx } from "react/jsx-runtime";
import { listClassName } from "@contember/utilities";
import md5 from "blueimp-md5";
const Avatar = (props) => {
  const { size = 1, shape = "Circle" } = props;
  const email = props.email || "";
  return /* @__PURE__ */ jsx("div", { className: listClassName(["avatar", `avatar-size${size}`, `avatar-shape${shape}`]), children: /* @__PURE__ */ jsx(
    "img",
    {
      className: "avatar-image",
      src: `https://s.gravatar.com/avatar/${md5(email.trim().toLowerCase())}?s=${size * 40}&d=mp`,
      alt: email.substring(0, 1).toUpperCase()
    }
  ) });
};
export {
  Avatar
};
//# sourceMappingURL=Avatar.js.map
