var e=Object.defineProperty,t=Object.defineProperties,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,s=(t,r,o)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,i=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&s(e,r,t[r]);if(o)for(var r of o(t))p.call(t,r)&&s(e,r,t[r]);return e},n=(e,o)=>t(e,r(o));import{b as l,d,E as f}from"./index-C9KXwj2c.js";import{d as b}from"./el-dropdown-item-DEgPCg9g.js";import{bt as c,a2 as u,_ as v,d as g,c as y,X as m,a as w,u as h,by as O,y as j,f as x,z as S,j as k,k as A,e as C,i as P,m as N,l as R,Y as $,ap as _,cC as B}from"./index-ip5gDR6L.js";const E=u({trigger:d.trigger,triggerKeys:d.triggerKeys,placement:b.placement,disabled:d.disabled,visible:l.visible,transition:l.transition,popperOptions:b.popperOptions,tabindex:b.tabindex,content:l.content,popperStyle:l.popperStyle,popperClass:l.popperClass,enterable:n(i({},l.enterable),{default:!0}),effect:n(i({},l.effect),{default:"light"}),teleported:l.teleported,appendTo:l.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}}),U={"update:visible":e=>c(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},K=g({name:"ElPopover"}),T=g(n(i({},K),{props:E,emits:U,setup(e,{expose:t,emit:r}){const o=e,a=y(()=>o["onUpdate:visible"]),p=m("popover"),s=w(),i=y(()=>{var e;return null==(e=h(s))?void 0:e.popperRef}),n=y(()=>[{width:O(o.width)},o.popperStyle]),l=y(()=>[p.b(),o.popperClass,{[p.m("plain")]:!!o.content}]),d=y(()=>o.transition===`${p.namespace.value}-fade-in-linear`),b=()=>{r("before-enter")},c=()=>{r("before-leave")},u=()=>{r("after-enter")},v=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:i,hide:()=>{var e;null==(e=s.value)||e.hide()}}),(e,t)=>(x(),j(h(f),$({ref_key:"tooltipRef",ref:s},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":h(l),"popper-style":h(n),teleported:e.teleported,"append-to":e.appendTo,persistent:e.persistent,"gpu-acceleration":h(d),"onUpdate:visible":h(a),onBeforeShow:b,onBeforeHide:c,onShow:u,onHide:v}),{content:S(()=>[e.title?(x(),C("div",{key:0,class:P(h(p).e("title")),role:"title"},N(e.title),3)):A("v-if",!0),k(e.$slots,"default",{},()=>[R(N(e.content),1)])]),default:S(()=>[e.$slots.reference?k(e.$slots,"reference",{key:0}):A("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"]))}}));const H=(e,t)=>{const r=t.arg||t.value,o=null==r?void 0:r.popperRef;o&&(o.triggerRef=e)};const z=_(v(T,[["__file","popover.vue"]]),{directive:B({mounted(e,t){H(e,t)},updated(e,t){H(e,t)}},"popover")});export{z as E};
