import{U as J,bj as u,bk as f,aJ as s,av as L,Z as v,G as l,j as Q,r as Z,ae as p,L as q,o as h,e as z,w as m,c as D,ad as I,t as g,ab as w,af as y,h as K,ai as M,aQ as T,am as V,bl as W,an as X,__tla as Y}from"./index.91e2b97e.js";let _,ee=Promise.all([(()=>{try{return Y}catch{}})()]).then(async()=>{const S=J({trigger:u.trigger,placement:f.placement,disabled:u.disabled,visible:s.visible,transition:s.transition,popperOptions:f.popperOptions,tabindex:f.tabindex,content:s.content,popperStyle:s.popperStyle,popperClass:s.popperClass,enterable:{...s.enterable,default:!0},effect:{...s.effect,default:"light"},teleported:s.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}}),k={"update:visible":t=>L(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},x="onUpdate:visible",A=v({name:"ElPopover"}),C=v({...A,props:S,emits:k,setup(t,{expose:r,emit:a}){const o=t,U=l(()=>o[x]),i=Q("popover"),n=Z(),$=l(()=>{var e;return(e=p(n))==null?void 0:e.popperRef}),B=l(()=>[{width:q(o.width)},o.popperStyle]),O=l(()=>[i.b(),o.popperClass,{[i.m("plain")]:!!o.content}]),j=l(()=>o.transition===`${i.namespace.value}-fade-in-linear`),E=()=>{var e;(e=n.value)==null||e.hide()},H=()=>{a("before-enter")},P=()=>{a("before-leave")},F=()=>{a("after-enter")},G=()=>{a("update:visible",!1),a("after-leave")};return r({popperRef:$,hide:E}),(e,te)=>(h(),z(p(T),M({ref_key:"tooltipRef",ref:n},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(O),"popper-style":p(B),teleported:e.teleported,persistent:e.persistent,"gpu-acceleration":p(j),"onUpdate:visible":p(U),onBeforeShow:H,onBeforeHide:P,onShow:F,onHide:G}),{content:m(()=>[e.title?(h(),D("div",{key:0,class:I(p(i).e("title")),role:"title"},g(e.title),3)):w("v-if",!0),y(e.$slots,"default",{},()=>[K(g(e.content),1)])]),default:m(()=>[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 N=V(C,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue"]]);const d=(t,r)=>{const a=r.arg||r.value,o=a==null?void 0:a.popperRef;o&&(o.triggerRef=t)};var R={mounted(t,r){d(t,r)},updated(t,r){d(t,r)}};let c,b;c="popover",b=W(R,c),_=X(N,{directive:b})});export{_ as E,ee as __tla};
