import React, { useContext } from "react";
import { RicosContext } from "./../../../ricos-context/index.js";
import { Image } from "./../../../ui-components/index.js";
import { FallbackAvatar } from "./fallback-avatar.js";
function VoterAvatar(props) {
  const { className, src, member, size } = props;
  const { t } = useContext(RicosContext);
  return src ? /* @__PURE__ */ React.createElement(
    Image,
    {
      uri: src,
      displayMode: "fill",
      alt: member.name?.nick || t("Polls_Plugin_User_Avatar_Alt"),
      height: size.height,
      width: size.width,
      containerProps: {
        className,
        style: size
      }
    }
  ) : /* @__PURE__ */ React.createElement(FallbackAvatar, { className });
}
export {
  VoterAvatar
};
//# sourceMappingURL=voter-avatar.js.map
