import{c as p}from"./classnames-3ZYesfuy.js";import{a as o}from"./react-CXoDaX02.js";import{o as K,a as i,k as Q}from"./@babel-BJZJ6yB5.js";import{T as U}from"./@rc-component-BWV3LfjC.js";import{x as Z}from"./rc-util-uI9ZRjCe.js";function ee(l){var e=l.children,f=l.prefixCls,m=l.id,v=l.overlayInnerStyle,u=l.bodyClassName,d=l.className,c=l.style;return o.createElement("div",{className:p("".concat(f,"-content"),d),style:c},o.createElement("div",{className:p("".concat(f,"-inner"),u),id:m,role:"tooltip",style:v},typeof e=="function"?e():e))}var n={shiftX:64,adjustY:1},s={adjustX:1,shiftY:!0},t=[0,0],te={left:{points:["cr","cl"],overflow:s,offset:[-4,0],targetOffset:t},right:{points:["cl","cr"],overflow:s,offset:[4,0],targetOffset:t},top:{points:["bc","tc"],overflow:n,offset:[0,-4],targetOffset:t},bottom:{points:["tc","bc"],overflow:n,offset:[0,4],targetOffset:t},topLeft:{points:["bl","tl"],overflow:n,offset:[0,-4],targetOffset:t},leftTop:{points:["tr","tl"],overflow:s,offset:[-4,0],targetOffset:t},topRight:{points:["br","tr"],overflow:n,offset:[0,-4],targetOffset:t},rightTop:{points:["tl","tr"],overflow:s,offset:[4,0],targetOffset:t},bottomRight:{points:["tr","br"],overflow:n,offset:[0,4],targetOffset:t},rightBottom:{points:["bl","br"],overflow:s,offset:[4,0],targetOffset:t},bottomLeft:{points:["tl","bl"],overflow:n,offset:[0,4],targetOffset:t},leftBottom:{points:["br","bl"],overflow:s,offset:[-4,0],targetOffset:t}},oe=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],le=function(e,f){var m=e.overlayClassName,v=e.trigger,u=v===void 0?["hover"]:v,d=e.mouseEnterDelay,c=d===void 0?0:d,y=e.mouseLeaveDelay,S=y===void 0?.1:y,_=e.overlayStyle,b=e.prefixCls,h=b===void 0?"rc-tooltip":b,C=e.children,D=e.onVisibleChange,$=e.afterVisibleChange,A=e.transitionName,I=e.animation,L=e.motion,w=e.placement,j=w===void 0?"right":w,N=e.align,R=N===void 0?{}:N,O=e.destroyTooltipOnHide,H=O===void 0?!1:O,B=e.defaultVisible,k=e.getTooltipContainer,X=e.overlayInnerStyle;e.arrowContent;var T=e.overlay,Y=e.id,P=e.showArrow,M=P===void 0?!0:P,r=e.classNames,a=e.styles,W=K(e,oe),x=Z(Y),E=o.useRef(null);o.useImperativeHandle(f,function(){return E.current});var V=i({},W);"visible"in e&&(V.popupVisible=e.visible);var q=function(){return o.createElement(ee,{key:"content",prefixCls:h,id:x,bodyClassName:r?.body,overlayInnerStyle:i(i({},X),a?.body)},T)},z=function(){var g=o.Children.only(C),G=g?.props||{},J=i(i({},G),{},{"aria-describedby":T?x:null});return o.cloneElement(C,J)};return o.createElement(U,Q({popupClassName:p(m,r?.root),prefixCls:h,popup:q,action:u,builtinPlacements:te,popupPlacement:j,ref:E,popupAlign:R,getPopupContainer:k,onPopupVisibleChange:D,afterPopupVisibleChange:$,popupTransitionName:A,popupAnimation:I,popupMotion:L,defaultPopupVisible:B,autoDestroy:H,mouseLeaveDelay:S,popupStyle:i(i({},_),a?.root),mouseEnterDelay:c,arrow:M},V),z())};const fe=o.forwardRef(le);export{ee as P,fe as T};
