import{aY as w,ce as K,bH as p,b5 as j,aZ as T,d as m,a_ as Y,r as $,Y as o,bK as q,cT as A,aM as B,o as c,c as v,ao as f,a as l,x as y,w as C,aK as F,bb as H,aC as M,T as N,a$ as P,b0 as V,__tla as Z}from"./index-8dc1e40a.js";let _,D=Promise.all([(()=>{try{return Z}catch{}})()]).then(async()=>{const b=w({size:{type:[Number,String],values:K,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:T(String),default:"cover"}}),d={error:s=>s instanceof Event},S=["src","alt","srcset"],g=m({name:"ElAvatar"});_=V(P(m({...g,props:b,emits:d,setup(s,{emit:h}){const t=s,e=Y("avatar"),n=$(!1),k=o(()=>{const{size:a,icon:i,shape:u}=t,r=[e.b()];return q(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:A(a)||""}):void 0}),E=o(()=>({objectFit:t.fit}));function x(a){n.value=!0,h("error",a)}return B(()=>t.src,()=>n.value=!1),(a,i)=>(c(),v("span",{class:N(l(k)),style:f(l(z))},[!a.src&&!a.srcSet||n.value?a.icon?(c(),y(l(H),{key:1},{default:C(()=>[(c(),y(F(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:x},null,44,S))],6))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]))});export{_ as E,D as __tla};
