import{b as f,u as r,E as A}from"./index-51e1cffc.js";import{d}from"./dropdown-8894c5a8.js";import{a0 as R,ax as U,a2 as h,G as n,a4 as $,r as D,f as p,o as u,g as K,w as c,c as V,n as I,t as v,l as b,ab as g,j as O,U as H,cb as L,ai as j}from"./index-25eb6331.js";import{I as z,_ as F}from"./index-3bef6acb.js";const G=R({trigger:f.trigger,triggerKeys:f.triggerKeys,placement:d.placement,disabled:f.disabled,visible:r.visible,transition:r.transition,popperOptions:d.popperOptions,tabindex:d.tabindex,content:r.content,popperStyle:r.popperStyle,popperClass:r.popperClass,enterable:{...r.enterable,default:!0},effect:{...r.effect,default:"light"},teleported:r.teleported,appendTo:r.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}}),q={"update:visible":t=>U(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},J="onUpdate:visible",M=h({name:"ElPopover"}),Q=h({...M,props:G,emits:q,setup(t,{expose:a,emit:s}){const o=t,y=n(()=>o[J]),i=$("popover"),l=D(),w=n(()=>{var e;return(e=p(l))==null?void 0:e.popperRef}),E=n(()=>[{width:z(o.width)},o.popperStyle]),P=n(()=>[i.b(),o.popperClass,{[i.m("plain")]:!!o.content}]),C=n(()=>o.transition==="".concat(i.namespace.value,"-fade-in-linear")),k=()=>{var e;(e=l.value)==null||e.hide()},S=()=>{s("before-enter")},B=()=>{s("before-leave")},N=()=>{s("after-enter")},T=()=>{s("update:visible",!1),s("after-leave")};return a({popperRef:w,hide:k}),(e,_)=>(u(),K(p(A),H({ref_key:"tooltipRef",ref:l},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":p(P),"popper-style":p(E),teleported:e.teleported,"append-to":e.appendTo,persistent:e.persistent,"gpu-acceleration":p(C),"onUpdate:visible":p(y),onBeforeShow:S,onBeforeHide:B,onShow:N,onHide:T}),{content:c(()=>[e.title?(u(),V("div",{key:0,class:I(p(i).e("title")),role:"title"},v(e.title),3)):b("v-if",!0),g(e.$slots,"default",{},()=>[O(v(e.content),1)])]),default:c(()=>[e.$slots.reference?g(e.$slots,"reference",{key:0}):b("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 W=F(Q,[["__file","popover.vue"]]);const m=(t,a)=>{const s=a.arg||a.value,o=s==null?void 0:s.popperRef;o&&(o.triggerRef=t)};var X={mounted(t,a){m(t,a)},updated(t,a){m(t,a)}};const Y="popover",Z=L(X,Y),re=j(W,{directive:Z});export{re as E};
