import{aA as q,c4 as w,bq as p,aL as x,aB as A,d as m,aC as B,r as F,K as o,bt as L,bG as N,L as $,o as c,c as v,au as f,a as l,v as y,w as C,N as D,aT as G,aD as K,$ as P,aE as T,aF as V,__tla as H}from"./index-04f8d540.js";let _,I=Promise.all([(()=>{try{return H}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:x},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:A(String),default:"cover"}}),S={error:s=>s instanceof Event},g=["src","alt","srcset"],h=m({name:"ElAvatar"});_=V(T(m({...h,props:d,emits:S,setup(s,{emit:b}){const t=s,e=B("avatar"),n=F(!1),k=o(()=>{const{size:a,icon:i,shape:u}=t,r=[e.b()];return L(a)&&r.push(e.m(a)),i&&r.push(e.m("icon")),u&&r.push(e.m(u)),r}),E=o(()=>{const{size:a}=t;return p(a)?e.cssVarBlock({size:N(a)||""}):void 0}),z=o(()=>({objectFit:t.fit}));function j(a){n.value=!0,b("error",a)}return $(()=>t.src,()=>n.value=!1),(a,i)=>(c(),v("span",{class:P(l(k)),style:f(l(E))},[!a.src&&!a.srcSet||n.value?a.icon?(c(),y(l(G),{key:1},{default:C(()=>[(c(),y(D(a.icon)))]),_:1})):K(a.$slots,"default",{key:2}):(c(),v("img",{key:0,src:a.src,alt:a.alt,srcset:a.srcSet,style:f(l(z)),onError:j},null,44,g))],6))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]))});export{_ as E,I as __tla};
