import{Q as f,bp as t,ac as n,bq as U,br as i,am as u,aB as D,aD as K,U as V,j as S,s as l,W as $,r as j,O as s,bo as H,l as z,h as v,w as g,a0 as y,x as m,c as F,n as I,t as h,e as L,aS as q,J,a4 as Q,bs as W}from"./index-Xuk4tRmH.js";const b=f({trigger:i.trigger,triggerKeys:{type:n(Array),default:()=>[u.enter,u.numpadEnter,u.space,u.down]},virtualTriggering:i.virtualTriggering,virtualRef:i.virtualRef,effect:{...t.effect,default:"light"},type:{type:n(String)},placement:{type:n(String),default:"bottom"},popperOptions:{type:n(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:n([Number,String]),default:0},maxHeight:{type:n([Number,String]),default:""},popperClass:t.popperClass,popperStyle:t.popperStyle,disabled:Boolean,role:{type:String,values:U,default:"menu"},buttonProps:{type:n(Object)},teleported:t.teleported,persistent:{type:Boolean,default:!0}});f({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:D}});f({onKeydown:{type:n(Function)}});const G=f({trigger:i.trigger,triggerKeys:i.triggerKeys,placement:b.placement,disabled:i.disabled,visible:t.visible,transition:t.transition,popperOptions:b.popperOptions,tabindex:b.tabindex,content:t.content,popperStyle:t.popperStyle,popperClass:t.popperClass,enterable:{...t.enterable,default:!0},effect:{...t.effect,default:"light"},teleported:t.teleported,appendTo:t.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}}),M={"update:visible":o=>K(o),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},X="onUpdate:visible",Y=S({name:"ElPopover"}),Z=S({...Y,props:G,emits:M,setup(o,{expose:a,emit:p}){const r=o,B=l(()=>r[X]),d=$("popover"),c=j(),T=l(()=>{var e;return(e=s(c))==null?void 0:e.popperRef}),C=l(()=>[{width:H(r.width)},r.popperStyle]),E=l(()=>[d.b(),r.popperClass,{[d.m("plain")]:!!r.content}]),P=l(()=>r.transition===`${d.namespace.value}-fade-in-linear`),N=()=>{var e;(e=c.value)==null||e.hide()},k=()=>{p("before-enter")},O=()=>{p("before-leave")},A=()=>{p("after-enter")},R=()=>{p("update:visible",!1),p("after-leave")};return a({popperRef:T,hide:N}),(e,oe)=>(v(),z(s(J),q({ref_key:"tooltipRef",ref:c},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":s(E),"popper-style":s(C),teleported:e.teleported,"append-to":e.appendTo,persistent:e.persistent,"gpu-acceleration":s(P),"onUpdate:visible":s(B),onBeforeShow:k,onBeforeHide:O,onShow:A,onHide:R}),{content:g(()=>[e.title?(v(),F("div",{key:0,class:I(s(d).e("title")),role:"title"},h(e.title),3)):m("v-if",!0),y(e.$slots,"default",{},()=>[L(h(e.content),1)])]),default:g(()=>[e.$slots.reference?y(e.$slots,"reference",{key:0}):m("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 _=V(Z,[["__file","popover.vue"]]);const w=(o,a)=>{const p=a.arg||a.value,r=p?.popperRef;r&&(r.triggerRef=o)};var x={mounted(o,a){w(o,a)},updated(o,a){w(o,a)}};const ee="popover",te=W(x,ee),ae=Q(_,{directive:te});export{ae as E};
