const e=require("../../_util/props-util/index.js"),t=require("../../_util/vue-types/index.js"),n=require("../../vc-trigger/index.js"),r=require("./placements.js"),i=require("./Content.js");let a=require("vue");function o(){}var s=(0,a.defineComponent)({compatConfig:{MODE:3},name:`Tooltip`,inheritAttrs:!1,props:{trigger:t.default.any.def([`hover`]),defaultVisible:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:t.default.string.def(`right`),transitionName:String,animation:t.default.any,afterVisibleChange:t.default.func.def(()=>{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:t.default.string.def(`rc-tooltip`),mouseEnterDelay:t.default.number.def(.1),mouseLeaveDelay:t.default.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:t.default.object.def(()=>({})),arrowContent:t.default.any.def(null),tipId:String,builtinPlacements:t.default.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(t,{slots:s,attrs:c,expose:l}){let u=(0,a.shallowRef)(),d=()=>{let{prefixCls:n,tipId:r,overlayInnerStyle:o}=t;return[t.arrow?(0,a.createVNode)(`div`,{class:`${n}-arrow`,key:`arrow`},[e.getPropsSlot(s,t,`arrowContent`)]):null,(0,a.createVNode)(i.default,{key:`content`,prefixCls:n,id:r,overlayInnerStyle:o},{overlay:s.overlay})]};l({getPopupDomNode:()=>u.value.getPopupDomNode(),triggerDOM:u,forcePopupAlign:()=>u.value?.forcePopupAlign()});let f=(0,a.shallowRef)(!1),p=(0,a.shallowRef)(!1);return(0,a.watchEffect)(()=>{let{destroyTooltipOnHide:e}=t;if(typeof e==`boolean`)f.value=e;else if(e&&typeof e==`object`){let{keepParent:t}=e;f.value=t===!0,p.value=t===!1}}),()=>{let{overlayClassName:e,trigger:i,mouseEnterDelay:l,mouseLeaveDelay:m,overlayStyle:h,prefixCls:g,afterVisibleChange:_,transitionName:v,animation:y,placement:b,align:x,destroyTooltipOnHide:S,defaultVisible:C,...w}=t,T={...w};return t.visible!==void 0&&(T.popupVisible=t.visible),(0,a.createVNode)(n.default,{popupClassName:e,prefixCls:g,action:i,builtinPlacements:r.default,popupPlacement:b,popupAlign:x,afterPopupVisibleChange:_,popupTransitionName:v,popupAnimation:y,defaultPopupVisible:C,destroyPopupOnHide:f.value,autoDestroy:p.value,mouseLeaveDelay:m,popupStyle:h,mouseEnterDelay:l,...T,...c,onPopupVisibleChange:t.onVisibleChange||o,onPopupAlign:t.onPopupAlign||o,ref:u,arrow:!!t.arrow,popup:d()},{default:s.default})}}});exports.default=s;