import{aL as w,ba as A,b8 as p,bi as x,aM as N,d as m,aN as P,r as q,e as i,b9 as B,bj as C,w as F,o as c,c as v,aH as f,a as l,C as y,A as G,a0 as H,aG as L,aO as M,ad as O,aP as Q,aQ as V,__tla as $}from"./index-286756b9.js";let _,D=Promise.all([(()=>{try{return $}catch{}})()]).then(async()=>{const d=w({size:{type:[Number,String],values:A,default:"",validator:s=>p(s)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:x},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:N(String),default:"cover"}}),S={error:s=>s instanceof Event},b=["src","alt","srcset"],g=m({name:"ElAvatar"});_=V(Q(m({...g,props:d,emits:S,setup(s,{emit:h}){const t=s,e=P("avatar"),n=q(!1),k=i(()=>{const{size:a,icon:o,shape:u}=t,r=[e.b()];return B(a)&&r.push(e.m(a)),o&&r.push(e.m("icon")),u&&r.push(e.m(u)),r}),z=i(()=>{const{size:a}=t;return p(a)?e.cssVarBlock({size:C(a)||""}):void 0}),E=i(()=>({objectFit:t.fit}));function j(a){n.value=!0,h("error",a)}return F(()=>t.src,()=>n.value=!1),(a,o)=>(c(),v("span",{class:O(l(k)),style:f(l(z))},[!a.src&&!a.srcSet||n.value?a.icon?(c(),y(l(L),{key:1},{default:G(()=>[(c(),y(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:f(l(E)),onError:j},null,44,b))],6))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]))});export{_ as E,D as __tla};