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