import{aD as q,bL as w,bl as p,bO as j,aE as F,d as m,aF as L,r as O,L as o,bq as P,c0 as A,M as B,o as c,c as v,ax as f,a as l,x as y,w as D,O as G,aP as H,aG as I,a0 as M,aH as N,aI as V,__tla as $}from"./index-7d5b26d3.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(N(m({...h,props:d,emits:S,setup(s,{emit:b}){const t=s,e=L("avatar"),n=O(!1),k=o(()=>{const{size:a,icon:i,shape:u}=t,r=[e.b()];return P(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:A(a)||""}):void 0}),z=o(()=>({objectFit:t.fit}));function x(a){n.value=!0,b("error",a)}return B(()=>t.src,()=>n.value=!1),(a,i)=>(c(),v("span",{class:M(l(k)),style:f(l(E))},[!a.src&&!a.srcSet||n.value?a.icon?(c(),y(l(H),{key:1},{default:D(()=>[(c(),y(G(a.icon)))]),_:1})):I(a.$slots,"default",{key:2}):(c(),v("img",{key:0,src:a.src,alt:a.alt,srcset:a.srcSet,style:f(l(z)),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};
