const e=require("../_util/canUseDom.js"),t=require("../vc-util/Dom/dynamicCSS.js"),n=require("../_util/warning.js"),r=require("../node_modules/.pnpm/@ctrl_tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/index.js"),i=require("../node_modules/.pnpm/@ant-design_colors@7.2.1/node_modules/@ant-design/colors/es/generate.js");require("../node_modules/.pnpm/@ant-design_colors@7.2.1/node_modules/@ant-design/colors/es/index.js");var a=`-ant-${Date.now()}-${Math.random()}`;function o(e,t){let n={},a=(e,t)=>{let n=e.clone();return n=t?.(n)||n,n.toRgbString()},o=(e,t)=>{let o=new r.TinyColor(e),s=i.default(o.toRgbString());n[`${t}-color`]=a(o),n[`${t}-color-disabled`]=s[1],n[`${t}-color-hover`]=s[4],n[`${t}-color-active`]=s[6],n[`${t}-color-outline`]=o.clone().setAlpha(.2).toRgbString(),n[`${t}-color-deprecated-bg`]=s[0],n[`${t}-color-deprecated-border`]=s[2]};if(t.primaryColor){o(t.primaryColor,`primary`);let e=new r.TinyColor(t.primaryColor),s=i.default(e.toRgbString());s.forEach((e,t)=>{n[`primary-${t+1}`]=e}),n[`primary-color-deprecated-l-35`]=a(e,e=>e.lighten(35)),n[`primary-color-deprecated-l-20`]=a(e,e=>e.lighten(20)),n[`primary-color-deprecated-t-20`]=a(e,e=>e.tint(20)),n[`primary-color-deprecated-t-50`]=a(e,e=>e.tint(50)),n[`primary-color-deprecated-f-12`]=a(e,e=>e.setAlpha(e.getAlpha()*.12));let c=new r.TinyColor(s[0]);n[`primary-color-active-deprecated-f-30`]=a(c,e=>e.setAlpha(e.getAlpha()*.3)),n[`primary-color-active-deprecated-d-02`]=a(c,e=>e.darken(2))}return t.successColor&&o(t.successColor,`success`),t.warningColor&&o(t.warningColor,`warning`),t.errorColor&&o(t.errorColor,`error`),t.infoColor&&o(t.infoColor,`info`),`
  :root {
    ${Object.keys(n).map(t=>`--${e}-${t}: ${n[t]};`).join(`
`)}
  }
  `.trim()}function s(r,i){let s=o(r,i);e.default()?t.updateCSS(s,`${a}-dynamic-theme`):n.default(!1,`ConfigProvider`,`SSR do not support dynamic theme with css variables.`)}exports.getStyle=o,exports.registerTheme=s;