import{PresetColors as e}from"../../theme/interface/presetColors.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=e=>{let{componentCls:n,popoverBg:r,popoverColor:i,width:o,fontWeightStrong:s,popoverPadding:c,boxShadowSecondary:l,colorTextHeading:u,borderRadiusLG:d,zIndexPopup:f,marginXS:p,colorBgElevated:m}=e;return[{[n]:{...t(e),position:`absolute`,top:0,left:{_skip_check_:!0,value:0},zIndex:f,fontWeight:`normal`,whiteSpace:`normal`,textAlign:`start`,cursor:`auto`,userSelect:`text`,"--antd-arrow-background-color":m,"&-rtl":{direction:`rtl`},"&-hidden":{display:`none`},[`${n}-content`]:{position:`relative`},[`${n}-inner`]:{backgroundColor:r,backgroundClip:`padding-box`,borderRadius:d,boxShadow:l,padding:c},[`${n}-title`]:{minWidth:o,marginBottom:p,color:u,fontWeight:s},[`${n}-inner-content`]:{color:i}}},a(e,{colorBg:`var(--antd-arrow-background-color)`}),{[`${n}-pure`]:{position:`relative`,maxWidth:`none`,[`${n}-content`]:{display:`inline-block`}}}]},s=t=>{let{componentCls:n}=t;return{[n]:e.map(e=>{let r=t[`${e}-6`];return{[`&${n}-${e}`]:{"--antd-arrow-background-color":r,[`${n}-inner`]:{backgroundColor:r},[`${n}-arrow`]:{background:`transparent`}}}})}},c=e=>{let{componentCls:t,lineWidth:n,lineType:r,colorSplit:i,paddingSM:a,controlHeight:o,fontSize:s,lineHeight:c,padding:l}=e,u=o-Math.round(s*c),d=u/2,f=u/2-n,p=l;return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${d}px ${p}px ${f}px`,borderBottom:`${n}px ${r} ${i}`},[`${t}-inner-content`]:{padding:`${a}px ${p}px`}}}},l=n(`Popover`,e=>{let{colorBgElevated:t,colorText:n,wireframe:a}=e,l=r(e,{popoverBg:t,popoverColor:n,popoverPadding:12});return[o(l),s(l),a&&c(l),i(l,`zoom-big`)]},({zIndexPopupBase:e})=>({zIndexPopup:e+30,width:177}));export{l as default};