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