import{R as _,aI as w,b6 as b,S as L,a1 as l,a as y,ag as B,r as I,W as S,aK as M,a8 as A,N as P,o as E,h as v,C as N,u as i,c as T,k as z,F as K,H as Y,Y as g,Z as j,$ as h,aq as F,ah as O,U as R,ab as D,aR as J,bo as u}from"./entry.49b00e51.js";import{c as U,u as q}from"./index.6ac3a200.js";const V=_({size:{type:[Number,String],values:w,default:"",validator:t=>b(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:L},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:l(String),default:"cover"}}),H={error:t=>t instanceof Event},W=["src","alt","srcset"],x=y({name:"ElAvatar"}),G=y({...x,props:V,emits:H,setup(t,{emit:c}){const n=t,o=B("avatar"),a=I(!1),m=S(()=>{const{size:e,icon:r,shape:s}=n,f=[o.b()];return M(e)&&f.push(o.m(e)),r&&f.push(o.m("icon")),s&&f.push(o.m(s)),f}),C=S(()=>{const{size:e}=n;return b(e)?o.cssVarBlock({size:A(e)||""}):void 0}),d=S(()=>({objectFit:n.fit}));P(()=>n.src,()=>a.value=!1);function p(e){a.value=!0,c("error",e)}return(e,r)=>(E(),v("span",{class:j(i(m)),style:N(i(C))},[(e.src||e.srcSet)&&!a.value?(E(),v("img",{key:0,src:e.src,alt:e.alt,srcset:e.srcSet,style:N(i(d)),onError:p},null,44,W)):e.icon?(E(),T(i(Y),{key:1},{default:z(()=>[(E(),T(K(e.icon)))]),_:1})):g(e.$slots,"default",{key:2})],6))}});var Z=h(G,[["__file","/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]);const pe=F(Z),Q=y({inheritAttrs:!1});function X(t,c,n,o,a,m){return g(t.$slots,"default")}var ee=h(Q,[["render",X],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);const te=y({name:"ElCollectionItem",inheritAttrs:!1});function oe(t,c,n,o,a,m){return g(t.$slots,"default")}var se=h(te,[["render",oe],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);const ne="data-el-collection-item",ae=t=>{const c=`El${t}Collection`,n=`${c}Item`,o=Symbol(c),a=Symbol(n),m={...ee,name:c,setup(){const d=I(null),p=new Map;O(o,{itemMap:p,getItems:()=>{const r=i(d);if(!r)return[];const s=Array.from(r.querySelectorAll(`[${ne}]`));return[...p.values()].sort(($,k)=>s.indexOf($.ref)-s.indexOf(k.ref))},collectionRef:d})}},C={...se,name:n,setup(d,{attrs:p}){const e=I(null),r=R(o,void 0);O(a,{collectionItemRef:e}),D(()=>{const s=i(e);s&&r.itemMap.set(s,{ref:s,...p})}),J(()=>{const s=i(e);r.itemMap.delete(s)})}};return{COLLECTION_INJECTION_KEY:o,COLLECTION_ITEM_INJECTION_KEY:a,ElCollection:m,ElCollectionItem:C}},ue=_({trigger:U.trigger,effect:{...q.effect,default:"light"},type:{type:l(String)},placement:{type:l(String),default:"bottom"},popperOptions:{type:l(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:l([Number,String]),default:0},maxHeight:{type:l([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:l(Object)}}),me=_({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:L}}),de=_({onKeydown:{type:l(Function)}}),re=[u.down,u.pageDown,u.home],le=[u.up,u.pageUp,u.end],fe=[...re,...le],{ElCollection:Ee,ElCollectionItem:_e,COLLECTION_INJECTION_KEY:ye,COLLECTION_ITEM_INJECTION_KEY:Ce}=ae("Dropdown");export{Ce as C,pe as E,fe as F,le as L,Ee as a,me as b,ae as c,ue as d,ne as e,_e as f,de as g,ye as h};
