import{genPresetColor as e}from"../../style/presetColor.mjs";import{resetComponent as t}from"../../style/index.mjs";import n from"../../theme/util/genComponentStyleHook.mjs";import{merge as r}from"../../theme/util/statistic.mjs";import{initZoomMotion as i}from"../../style/motion/zoom.mjs";import a from"../../style/placementArrow.mjs";var o=n=>{let{componentCls:i,tooltipMaxWidth:o,tooltipColor:s,tooltipBg:c,tooltipBorderRadius:l,zIndexPopup:u,controlHeight:d,boxShadowSecondary:f,paddingSM:p,paddingXS:m,tooltipRadiusOuter:h}=n;return[{[i]:{...t(n),position:`absolute`,zIndex:u,display:`block`,"&":[{width:`max-content`},{width:`intrinsic`}],maxWidth:o,visibility:`visible`,"&-hidden":{display:`none`},"--antd-arrow-background-color":c,[`${i}-inner`]:{minWidth:d,minHeight:d,padding:`${p/2}px ${m}px`,color:s,textAlign:`start`,textDecoration:`none`,wordWrap:`break-word`,backgroundColor:c,borderRadius:l,boxShadow:f},[[`&-placement-left`,`&-placement-leftTop`,`&-placement-leftBottom`,`&-placement-right`,`&-placement-rightTop`,`&-placement-rightBottom`].join(`,`)]:{[`${i}-inner`]:{borderRadius:Math.min(l,8)}},[`${i}-content`]:{position:`relative`},...e(n,(e,{darkColor:t})=>({[`&${i}-${e}`]:{[`${i}-inner`]:{backgroundColor:t},[`${i}-arrow`]:{"--antd-arrow-background-color":t}}})),"&-rtl":{direction:`rtl`}}},a(r(n,{borderRadiusOuter:h}),{colorBg:`var(--antd-arrow-background-color)`,showArrowCls:``,contentRadius:l,limitVerticalRadius:!0}),{[`${i}-pure`]:{position:`relative`,maxWidth:`none`}}]},s=(e,t)=>n(`Tooltip`,e=>{if(t?.value===!1)return[];let{borderRadius:n,colorTextLightSolid:a,colorBgDefault:s,borderRadiusOuter:c}=e;return[o(r(e,{tooltipMaxWidth:250,tooltipColor:a,tooltipBorderRadius:n,tooltipBg:s,tooltipRadiusOuter:c>4?4:c})),i(e,`zoom-big-fast`)]},({zIndexPopupBase:e,colorBgSpotlight:t})=>({zIndexPopup:e+70,colorBgDefault:t}))(e);export{s as default};