import '../../../utils/index.mjs';
import { warning } from '../../../utils/log.mjs';

var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  return value;
};
let uuid = 0;
class Theme {
  constructor(derivatives) {
    __publicField(this, "derivatives");
    __publicField(this, "id");
    this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
    this.id = uuid;
    if (derivatives.length === 0) {
      warning(
        derivatives.length > 0,
        "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."
      );
    }
    uuid += 1;
  }
  getDerivativeToken(token) {
    return this.derivatives.reduce(
      (result, derivative) => derivative(token, result),
      void 0
    );
  }
}

export { Theme as default };
//# sourceMappingURL=Theme.mjs.map
