"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("../../style/index.js");require("../../_util/cssinjs/StyleContext.js");require("vue");require("../../_util/cssinjs/transformers/legacyLogicalProperties.js");const $=require("../../style/motion/zoom.js"),v=require("../../style/placementArrow.js");require("../../theme/internal.js");const b=require("../../theme/util/genComponentStyleHook.js"),x=require("../../theme/util/statistic.js"),h=require("../../theme/interface/presetColors.js"),S=e=>{const{componentCls:o,popoverBg:r,popoverColor:t,width:n,fontWeightStrong:d,popoverPadding:l,boxShadowSecondary:a,colorTextHeading:p,borderRadiusLG:c,zIndexPopup:i,marginXS:s,colorBgElevated:g}=e;return[{[o]:{...m.resetComponent(e),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":g,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${o}-content`]:{position:"relative"},[`${o}-inner`]:{backgroundColor:r,backgroundClip:"padding-box",borderRadius:c,boxShadow:a,padding:l},[`${o}-title`]:{minWidth:n,marginBottom:s,color:p,fontWeight:d},[`${o}-inner-content`]:{color:t}}},v.default(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${o}-pure`]:{position:"relative",maxWidth:"none",[`${o}-content`]:{display:"inline-block"}}}]},C=e=>{const{componentCls:o}=e;return{[o]:h.PresetColors.map(r=>{const t=e[`${r}-6`];return{[`&${o}-${r}`]:{"--antd-arrow-background-color":t,[`${o}-inner`]:{backgroundColor:t},[`${o}-arrow`]:{background:"transparent"}}}})}},B=e=>{const{componentCls:o,lineWidth:r,lineType:t,colorSplit:n,paddingSM:d,controlHeight:l,fontSize:a,lineHeight:p,padding:c}=e,i=l-Math.round(a*p),s=i/2,g=i/2-r,u=c;return{[o]:{[`${o}-inner`]:{padding:0},[`${o}-title`]:{margin:0,padding:`${s}px ${u}px ${g}px`,borderBottom:`${r}px ${t} ${n}`},[`${o}-inner-content`]:{padding:`${d}px ${u}px`}}}},f=b.default("Popover",e=>{const{colorBgElevated:o,colorText:r,wireframe:t}=e,n=x.merge(e,{popoverBg:o,popoverColor:r,popoverPadding:12});return[S(n),C(n),t&&B(n),$.initZoomMotion(n,"zoom-big")]},({zIndexPopupBase:e})=>({zIndexPopup:e+30,width:177}));exports.default=f;
