var $=Object.defineProperty,D=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var v=(o,t,r)=>t in o?$(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,l=(o,t)=>{for(var r in t||(t={}))H.call(t,r)&&v(o,r,t[r]);if(c)for(var r of c(t))I.call(t,r)&&v(o,r,t[r]);return o},f=(o,t)=>D(o,V(t));import{c as b,a,E as L}from"./popper.aedd2598.js";import{b as z,J as F,a as J,O as K,_ as j,bi as q,w as G}from"./base.b65bdcd1.js";import{d as u}from"./dropdown.d1deefd6.js";import{d as P,c as n,r as M,u as p,a as m,b as Q,e as h,f as W,g as X,t as g,k as w,i as y,O as Y,x as Z}from"./index.965ac11d.js";const _=z({trigger:b.trigger,placement:u.placement,disabled:b.disabled,visible:a.visible,transition:a.transition,popperOptions:u.popperOptions,tabindex:u.tabindex,content:a.content,popperStyle:a.popperStyle,popperClass:a.popperClass,enterable:f(l({},a.enterable),{default:!0}),effect:f(l({},a.effect),{default:"light"}),teleported:a.teleported,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}}),x={"update:visible":o=>F(o),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},ee="onUpdate:visible",te=P({name:"ElPopover"}),oe=P(f(l({},te),{props:_,emits:x,setup(o,{expose:t,emit:r}){const s=o,C=n(()=>s[ee]),i=J("popover"),d=M(),k=n(()=>{var e;return(e=p(d))==null?void 0:e.popperRef}),S=n(()=>[{width:K(s.width)},s.popperStyle]),B=n(()=>[i.b(),s.popperClass,{[i.m("plain")]:!!s.content}]),N=n(()=>s.transition===`${i.namespace.value}-fade-in-linear`),A=()=>{var e;(e=d.value)==null||e.hide()},R=()=>{r("before-enter")},U=()=>{r("before-leave")},O=()=>{r("after-enter")},T=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:k,hide:A}),(e,ne)=>(m(),Q(p(L),Z({ref_key:"tooltipRef",ref:d},e.$attrs,{trigger:e.trigger,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(B),"popper-style":p(S),teleported:e.teleported,persistent:e.persistent,"gpu-acceleration":p(N),"onUpdate:visible":p(C),onBeforeShow:R,onBeforeHide:U,onShow:O,onHide:T}),{content:h(()=>[e.title?(m(),W("div",{key:0,class:X(p(i).e("title")),role:"title"},g(e.title),3)):w("v-if",!0),y(e.$slots,"default",{},()=>[Y(g(e.content),1)])]),default:h(()=>[e.$slots.reference?y(e.$slots,"reference",{key:0}):w("v-if",!0)]),_:3},16,["trigger","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","persistent","gpu-acceleration","onUpdate:visible"]))}}));var re=j(oe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue"]]);const E=(o,t)=>{const r=t.arg||t.value,s=r==null?void 0:r.popperRef;s&&(s.triggerRef=o)};var se={mounted(o,t){E(o,t)},updated(o,t){E(o,t)}};const ae="popover",pe=q(se,ae),ce=G(re,{directive:pe});export{ce as E};
