import{B as e,cd as t,ce as o,bU as a,N as r,h as s,M as p,r as i,p as l,a7 as n,o as f,v as d,b,c,n as u,t as v,e as h,O as m,W as g,aa as w,bo as y,P as x,cf as S,a2 as A}from"./index-BhrLSE9x.js";import{d as N}from"./dropdown-BBKfe7Gu.js";const B=e({trigger:t.trigger,placement:N.placement,disabled:t.disabled,visible:o.visible,transition:o.transition,popperOptions:N.popperOptions,tabindex:N.tabindex,content:o.content,popperStyle:o.popperStyle,popperClass:o.popperClass,enterable:{...o.enterable,default:!0},effect:{...o.effect,default:"light"},teleported:o.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}}),C={"update:visible":e=>a(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},R=r({name:"ElPopover"}),U=r({...R,props:B,emits:C,setup(e,{expose:t,emit:o}){const a=e,r=s((()=>a["onUpdate:visible"])),x=p("popover"),S=i(),A=s((()=>{var e;return null==(e=l(S))?void 0:e.popperRef})),N=s((()=>[{width:n(a.width)},a.popperStyle])),B=s((()=>[x.b(),a.popperClass,{[x.m("plain")]:!!a.content}])),C=s((()=>a.transition===`${x.namespace.value}-fade-in-linear`)),R=()=>{o("before-enter")},U=()=>{o("before-leave")},$=()=>{o("after-enter")},O=()=>{o("update:visible",!1),o("after-leave")};return t({popperRef:A,hide:()=>{var e;null==(e=S.value)||e.hide()}}),(e,t)=>(f(),d(l(y),w({ref_key:"tooltipRef",ref:S},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":l(B),"popper-style":l(N),teleported:e.teleported,persistent:e.persistent,"gpu-acceleration":l(C),"onUpdate:visible":l(r),onBeforeShow:R,onBeforeHide:U,onShow:$,onHide:O}),{content:b((()=>[e.title?(f(),c("div",{key:0,class:u(l(x).e("title")),role:"title"},v(e.title),3)):h("v-if",!0),m(e.$slots,"default",{},(()=>[g(v(e.content),1)]))])),default:b((()=>[e.$slots.reference?m(e.$slots,"reference",{key:0}):h("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"]))}});const $=(e,t)=>{const o=t.arg||t.value,a=null==o?void 0:o.popperRef;a&&(a.triggerRef=e)};const O=A(x(U,[["__file","popover.vue"]]),{directive:S({mounted(e,t){$(e,t)},updated(e,t){$(e,t)}},"popover")});export{O as E};
