import{anyType as e,withInstall as t}from"../_util/type.mjs";import n from"../_util/warning.mjs";import r from"../_util/classNames.mjs";import i from"../_util/omit.mjs";import a from"../_util/props-util/initDefaultProps.mjs";import{filterEmpty as o}from"../_util/props-util/index.mjs";import s from"../config-provider/hooks/useConfigInject.mjs";import{getTransitionName as c}from"../_util/transition.mjs";import l from"../tooltip/abstractTooltipProps.mjs";import{tooltipDefaultProps as u}from"../tooltip/Tooltip.mjs";import d from"../tooltip/index.mjs";import f from"./style/index.mjs";import{Fragment as p,computed as m,createVNode as h,defineComponent as g,ref as _}from"vue";var v=()=>({...l(),content:e(),title:e()}),y=t(g({compatConfig:{MODE:3},name:`APopover`,inheritAttrs:!1,props:a(v(),{...u(),trigger:`hover`,placement:`top`,mouseEnterDelay:.1,mouseLeaveDelay:.1}),setup(e,{expose:t,slots:a,attrs:l}){let u=_();n(e.visible===void 0,`popover`,"`visible` will be removed in next major version, please use `open` instead."),t({getPopupDomNode:()=>u.value?.getPopupDomNode?.()});let{prefixCls:g,configProvider:v}=s(`popover`,e),[y,b]=f(g),x=m(()=>v.getPrefixCls()),S=()=>{let{title:t=o(a.title?.()),content:n=o(a.content?.())}=e,r=!!(Array.isArray(t)?t.length:t),i=!!(Array.isArray(n)?n.length:t);return!r&&!i?null:h(p,null,[r&&h(`div`,{class:`${g.value}-title`},[t]),h(`div`,{class:`${g.value}-inner-content`},[n])])};return()=>{let t=r(e.overlayClassName,b.value);return y(h(d,{...i(e,[`title`,`content`]),...l,prefixCls:g.value,ref:u,overlayClassName:t,transitionName:c(x.value,`zoom-big`,e.transitionName),"data-popover-inject":!0},{title:S,default:a.default}))}}}));export{y as default,v as popoverProps};