import{b as S,u as E,r as b}from"./index-51e1cffc.js";import{a2 as C,ab as y,r as _,aa as I,a3 as L,e as $,f,a6 as M,a0 as m,a1 as o}from"./index-25eb6331.js";import{_ as T,d as e,s as h}from"./index-3bef6acb.js";const w=C({inheritAttrs:!1});function v(n,s,a,r,i,d){return y(n.$slots,"default")}var A=T(w,[["render",v],["__file","collection.vue"]]);const B=C({name:"ElCollectionItem",inheritAttrs:!1});function K(n,s,a,r,i,d){return y(n.$slots,"default")}var P=T(B,[["render",K],["__file","collection-item.vue"]]);const x="data-el-collection-item",Y=n=>{const s="El".concat(n,"Collection"),a="".concat(s,"Item"),r=Symbol(s),i=Symbol(a),d={...A,name:s,setup(){const u=_(),c=new Map;I(r,{itemMap:c,getItems:()=>{const l=f(u);if(!l)return[];const t=Array.from(l.querySelectorAll("[".concat(x,"]")));return[...c.values()].sort((g,N)=>t.indexOf(g.ref)-t.indexOf(N.ref))},collectionRef:u})}},O={...P,name:a,setup(u,{attrs:c}){const p=_(),l=L(r,void 0);I(i,{collectionItemRef:p}),$(()=>{const t=f(p);t&&l.itemMap.set(t,{ref:t,...c})}),M(()=>{const t=f(p);l.itemMap.delete(t)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:d,ElCollectionItem:O}},V=m({trigger:S.trigger,triggerKeys:{type:o(Array),default:()=>[e.enter,e.numpadEnter,e.space,e.down]},effect:{...E.effect,default:"light"},type:{type:o(String)},placement:{type:o(String),default:"bottom"},popperOptions:{type:o(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:o([Number,String]),default:0},maxHeight:{type:o([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,values:b,default:"menu"},buttonProps:{type:o(Object)},teleported:E.teleported,persistent:{type:Boolean,default:!0}}),k=m({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:h}}),q=m({onKeydown:{type:o(Function)}}),j=[e.down,e.pageDown,e.home],F=[e.up,e.pageUp,e.end],z=[...j,...F],{ElCollection:G,ElCollectionItem:H,COLLECTION_INJECTION_KEY:W,COLLECTION_ITEM_INJECTION_KEY:Q}=Y("Dropdown");export{Q as C,G as E,z as F,F as L,k as a,x as b,Y as c,V as d,H as e,q as f,W as g};
