import{W as T,f as E,a3 as h,i as S,l as k,p as K,a1 as l,q as R,D as $,S as C,aF as a,ae as i,aG as D,an as y,aH as g,aI as U,aJ as V,m as b,Y as j,aK as H,h as F,o as B,w as P,v as _,c as J,n as Y,t as A,d as q,aL as z,H as G,a7 as W,aM as Q}from"./index-C5vwY3A6.js";const X=E({inheritAttrs:!1});function Z(t,r,n,o,c,p){return h(t.$slots,"default")}var x=T(X,[["render",Z],["__file","collection.vue"]]);const ee=E({name:"ElCollectionItem",inheritAttrs:!1});function te(t,r,n,o,c,p){return h(t.$slots,"default")}var oe=T(ee,[["render",te],["__file","collection-item.vue"]]);const re="data-el-collection-item",ne=t=>{const r=`El${t}Collection`,n=`${r}Item`,o=Symbol(r),c=Symbol(n),p={...x,name:r,setup(){const v=S(),f=new Map;$(o,{itemMap:f,getItems:()=>{const d=l(v);if(!d)return[];const s=Array.from(d.querySelectorAll(`[${re}]`));return[...f.values()].sort((w,N)=>s.indexOf(w.ref)-s.indexOf(N.ref))},collectionRef:v})}},m={...oe,name:n,setup(v,{attrs:f}){const u=S(),d=k(o,void 0);$(c,{collectionItemRef:u}),K(()=>{const s=l(u);s&&d.itemMap.set(s,{ref:s,...f})}),R(()=>{const s=l(u);d.itemMap.delete(s)})}};return{COLLECTION_INJECTION_KEY:o,COLLECTION_ITEM_INJECTION_KEY:c,ElCollection:p,ElCollectionItem:m}},I=C({trigger:g.trigger,triggerKeys:{type:i(Array),default:()=>[y.enter,y.numpadEnter,y.space,y.down]},effect:{...a.effect,default:"light"},type:{type:i(String)},placement:{type:i(String),default:"bottom"},popperOptions:{type:i(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:i([Number,String]),default:0},maxHeight:{type:i([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,values:D,default:"menu"},buttonProps:{type:i(Object)},teleported:a.teleported,persistent:{type:Boolean,default:!0}});C({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:U}});C({onKeydown:{type:i(Function)}});ne("Dropdown");const ae=C({trigger:g.trigger,triggerKeys:g.triggerKeys,placement:I.placement,disabled:g.disabled,visible:a.visible,transition:a.transition,popperOptions:I.popperOptions,tabindex:I.tabindex,content:a.content,popperStyle:a.popperStyle,popperClass:a.popperClass,enterable:{...a.enterable,default:!0},effect:{...a.effect,default:"light"},teleported:a.teleported,appendTo:a.appendTo,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),se={"update:visible":t=>V(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},le="onUpdate:visible",pe=E({name:"ElPopover"}),ie=E({...pe,props:ae,emits:se,setup(t,{expose:r,emit:n}){const o=t,c=b(()=>o[le]),p=j("popover"),m=S(),v=b(()=>{var e;return(e=l(m))==null?void 0:e.popperRef}),f=b(()=>[{width:H(o.width)},o.popperStyle]),u=b(()=>[p.b(),o.popperClass,{[p.m("plain")]:!!o.content}]),d=b(()=>o.transition===`${p.namespace.value}-fade-in-linear`),s=()=>{var e;(e=m.value)==null||e.hide()},O=()=>{n("before-enter")},w=()=>{n("before-leave")},N=()=>{n("after-enter")},M=()=>{n("update:visible",!1),n("after-leave")};return r({popperRef:v,hide:s}),(e,me)=>(B(),F(l(G),z({ref_key:"tooltipRef",ref:m},e.$attrs,{trigger:e.trigger,"trigger-keys":e.triggerKeys,placement:e.placement,disabled:e.disabled,visible:e.visible,transition:e.transition,"popper-options":e.popperOptions,tabindex:e.tabindex,content:e.content,offset:e.offset,"show-after":e.showAfter,"hide-after":e.hideAfter,"auto-close":e.autoClose,"show-arrow":e.showArrow,"aria-label":e.title,effect:e.effect,enterable:e.enterable,"popper-class":l(u),"popper-style":l(f),teleported:e.teleported,"append-to":e.appendTo,persistent:e.persistent,"gpu-acceleration":l(d),"onUpdate:visible":l(c),onBeforeShow:O,onBeforeHide:w,onShow:N,onHide:M}),{content:P(()=>[e.title?(B(),J("div",{key:0,class:Y(l(p).e("title")),role:"title"},A(e.title),3)):_("v-if",!0),h(e.$slots,"default",{},()=>[q(A(e.content),1)])]),default:P(()=>[e.$slots.reference?h(e.$slots,"reference",{key:0}):_("v-if",!0)]),_:3},16,["trigger","trigger-keys","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","append-to","persistent","gpu-acceleration","onUpdate:visible"]))}});var de=T(ie,[["__file","popover.vue"]]);const L=(t,r)=>{const n=r.arg||r.value,o=n?.popperRef;o&&(o.triggerRef=t)};var ce={mounted(t,r){L(t,r)},updated(t,r){L(t,r)}};const fe="popover",ue=Q(ce,fe),be=W(de,{directive:ue});export{be as E};
