import"./chunk-QTnfLwEv.js";import{i as e,o as t,r as n,t as r}from"./jsx-runtime-DHSfUA5-.js";import{t as i}from"./useAttachmentThumbUrl-D6z1SOlU.js";import{d as a}from"./selectors-DZWoTA9D.js";t();var o=r();function s({model:t,identity:r,size:s,className:c,testId:l}){let u=a(t,r),d=i(u?.type===`image`?u:void 0,{role:`avatar`}),f={width:s,height:s},p=n(e.UserAvatar.Root,c);if(d)return(0,o.jsx)(`img`,{className:n(p,e.UserAvatar.ImageFit),"data-test-id":l,src:d,alt:``,style:f});let m=r.name.trim().slice(0,1).toUpperCase()||`?`;return(0,o.jsx)(`span`,{className:p,"data-test-id":l,style:{...f,fontSize:Math.round(s*.42)},"aria-hidden":`true`,children:m})}export{s as t};
//# sourceMappingURL=IdentityAvatar-BeraNLg7.js.map