import{Br as e,G as t,Ht as n,Jr as r,Or as i,Ut as a,W as o,ar as s,cr as c,di as l,dr as u,jr as d,lr as f,mi as p,nt as m,ot as h,pr as g,qt as _,sr as v,ti as y,v as b,vr as x}from"./style-QAnagFj5.js";import{L as S,a as C,i as w,o as T,u as E}from"./style-BqiJaO0R.js";var D=n({trigger:{...C.trigger,type:a([String,Array])},triggerKeys:{type:a(Array),default:()=>[S.enter,S.numpadEnter,S.space,S.down]},virtualTriggering:C.virtualTriggering,virtualRef:C.virtualRef,effect:{...T.effect,default:`light`},type:{type:a(String)},placement:{type:a(String),default:`bottom`},popperOptions:{type:a(Object),default:()=>({})},id:String,size:{type:String,default:``},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:a([Number,String]),default:0},maxHeight:{type:a([Number,String]),default:``},popperClass:T.popperClass,popperStyle:T.popperStyle,disabled:Boolean,role:{type:String,values:E,default:`menu`},buttonProps:{type:a(Object)},teleported:T.teleported,appendTo:T.appendTo,persistent:{type:Boolean,default:!0}});n({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:b}}),n({onKeydown:{type:a(Function)}});var O=[S.down,S.pageDown,S.home],k=[S.up,S.pageUp,S.end];[...O,...k];var A=n({trigger:C.trigger,triggerKeys:C.triggerKeys,placement:D.placement,disabled:C.disabled,visible:T.visible,transition:T.transition,popperOptions:D.popperOptions,tabindex:D.tabindex,content:T.content,popperStyle:T.popperStyle,popperClass:T.popperClass,enterable:{...T.enterable,default:!0},effect:{...T.effect,default:`light`},teleported:T.teleported,appendTo:T.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}}),j={"update:visible":e=>_(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},M=`onUpdate:visible`,N=g({name:`ElPopover`,__name:`popover`,props:A,emits:j,setup(t,{expose:n,emit:a}){let o=t,g=a,_=s(()=>o[M]),b=m(`popover`),S=r(),C=s(()=>y(S)?.popperRef),T=s(()=>[{width:h(o.width)},o.popperStyle]),E=s(()=>[b.b(),o.popperClass,{[b.m(`plain`)]:!!o.content}]),D=s(()=>o.transition===`${b.namespace.value}-fade-in-linear`),O=()=>{S.value?.hide()},k=()=>{g(`before-enter`)},A=()=>{g(`before-leave`)},j=()=>{g(`after-enter`)},N=()=>{g(`update:visible`,!1),g(`after-leave`)};return n({popperRef:C,hide:O}),(n,r)=>(i(),v(y(w),x({ref_key:`tooltipRef`,ref:S},n.$attrs,{trigger:t.trigger,"trigger-keys":t.triggerKeys,placement:t.placement,disabled:t.disabled,visible:t.visible,transition:t.transition,"popper-options":t.popperOptions,tabindex:t.tabindex,content:t.content,offset:t.offset,"show-after":t.showAfter,"hide-after":t.hideAfter,"auto-close":t.autoClose,"show-arrow":t.showArrow,"aria-label":t.title,effect:t.effect,enterable:t.enterable,"popper-class":E.value,"popper-style":T.value,teleported:t.teleported,"append-to":t.appendTo,persistent:t.persistent,"gpu-acceleration":D.value,"onUpdate:visible":_.value,onBeforeShow:k,onBeforeHide:A,onShow:j,onHide:N}),{content:e(()=>[t.title?(i(),f(`div`,{key:0,class:l(y(b).e(`title`)),role:`title`},p(t.title),3)):c(`v-if`,!0),d(n.$slots,`default`,{hide:O},()=>[u(p(t.content),1)])]),default:e(()=>[n.$slots.reference?d(n.$slots,`reference`,{key:0}):c(`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`]))}}),P=(e,t)=>{let n=(t.arg||t.value)?.popperRef;n&&(n.triggerRef=e)},F=o(N,{directive:t({mounted(e,t){P(e,t)},updated(e,t){P(e,t)}},`popover`)});export{F as t};