import{aD as q,bL as w,bl as p,bO as j,aE as F,d as m,aF as L,r as N,L as o,bq as A,c1 as B,M as D,o as c,c as v,az as y,a as l,x as f,w as G,N as H,ay as I,aG as M,a0 as O,aH as P,aI as V,__tla as $}from"./index-3fb48822.js";let _,C=Promise.all([(()=>{try{return $}catch{}})()]).then(async()=>{const d=q({size:{type:[Number,String],values:w,default:"",validator:s=>p(s)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:j},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:F(String),default:"cover"}}),S={error:s=>s instanceof Event},g=["src","alt","srcset"],h=m({name:"ElAvatar"});_=V(P(m({...h,props:d,emits:S,setup(s,{emit:b}){const t=s,e=L("avatar"),n=N(!1),k=o(()=>{const{size:a,icon:i,shape:u}=t,r=[e.b()];return A(a)&&r.push(e.m(a)),i&&r.push(e.m("icon")),u&&r.push(e.m(u)),r}),z=o(()=>{const{size:a}=t;return p(a)?e.cssVarBlock({size:B(a)||""}):void 0}),E=o(()=>({objectFit:t.fit}));function x(a){n.value=!0,b("error",a)}return D(()=>t.src,()=>n.value=!1),(a,i)=>(c(),v("span",{class:O(l(k)),style:y(l(z))},[!a.src&&!a.srcSet||n.value?a.icon?(c(),f(l(I),{key:1},{default:G(()=>[(c(),f(H(a.icon)))]),_:1})):M(a.$slots,"default",{key:2}):(c(),v("img",{key:0,src:a.src,alt:a.alt,srcset:a.srcSet,style:y(l(E)),onError:x},null,44,g))],6))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]))});export{_ as E,C as __tla};