import{resetComponent as u}from"../../style/index.mjs";import"../../_util/cssinjs/StyleContext.mjs";import"vue";import"../../_util/cssinjs/transformers/legacyLogicalProperties.mjs";import{initZoomMotion as $}from"../../style/motion/zoom.mjs";import x from"../../style/placementArrow.mjs";import"../../theme/internal.mjs";import h from"../../theme/util/genComponentStyleHook.mjs";import{merge as v}from"../../theme/util/statistic.mjs";import{PresetColors as b}from"../../theme/interface/presetColors.mjs";const S=t=>{const{componentCls:o,popoverBg:r,popoverColor:n,width:e,fontWeightStrong:p,popoverPadding:d,boxShadowSecondary:a,colorTextHeading:l,borderRadiusLG:c,zIndexPopup:i,marginXS:g,colorBgElevated:m}=t;return[{[o]:{...u(t),position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:i,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":m,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${o}-content`]:{position:"relative"},[`${o}-inner`]:{backgroundColor:r,backgroundClip:"padding-box",borderRadius:c,boxShadow:a,padding:d},[`${o}-title`]:{minWidth:e,marginBottom:g,color:l,fontWeight:p},[`${o}-inner-content`]:{color:n}}},x(t,{colorBg:"var(--antd-arrow-background-color)"}),{[`${o}-pure`]:{position:"relative",maxWidth:"none",[`${o}-content`]:{display:"inline-block"}}}]},f=t=>{const{componentCls:o}=t;return{[o]:b.map(r=>{const n=t[`${r}-6`];return{[`&${o}-${r}`]:{"--antd-arrow-background-color":n,[`${o}-inner`]:{backgroundColor:n},[`${o}-arrow`]:{background:"transparent"}}}})}},C=t=>{const{componentCls:o,lineWidth:r,lineType:n,colorSplit:e,paddingSM:p,controlHeight:d,fontSize:a,lineHeight:l,padding:c}=t,i=d-Math.round(a*l),g=i/2,m=i/2-r,s=c;return{[o]:{[`${o}-inner`]:{padding:0},[`${o}-title`]:{margin:0,padding:`${g}px ${s}px ${m}px`,borderBottom:`${r}px ${n} ${e}`},[`${o}-inner-content`]:{padding:`${p}px ${s}px`}}}},M=h("Popover",t=>{const{colorBgElevated:o,colorText:r,wireframe:n}=t,e=v(t,{popoverBg:o,popoverColor:r,popoverPadding:12});return[S(e),f(e),n&&C(e),$(e,"zoom-big")]},({zIndexPopupBase:t})=>({zIndexPopup:t+30,width:177}));export{M as default};
