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