'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var colors = require('@ant-design/colors');
var genControlHeight = require('../shared/genControlHeight.cjs');
var genSizeMapToken = require('../shared/genSizeMapToken.cjs');
var seed = require('../seed.cjs');
var genColorMapToken = require('../shared/genColorMapToken.cjs');
var genCommonMapToken = require('../shared/genCommonMapToken.cjs');
var genFontMapToken = require('../shared/genFontMapToken.cjs');
var colors$1 = require('./colors.cjs');

function derivative(token) {
  const colorPalettes = Object.keys(seed.defaultPresetColors).map((colorKey) => {
    const colors$1 = colors.generate(token[colorKey]);
    return new Array(10).fill(1).reduce((prev, _, i) => {
      prev[`${colorKey}-${i + 1}`] = colors$1[i];
      return prev;
    }, {});
  }).reduce((prev, cur) => {
    prev = {
      ...prev,
      ...cur
    };
    return prev;
  }, {});
  return {
    ...token,
    ...colorPalettes,
    // Colors
    ...genColorMapToken.default(token, {
      generateColorPalettes: colors$1.generateColorPalettes,
      generateNeutralColorPalettes: colors$1.generateNeutralColorPalettes
    }),
    // Font
    ...genFontMapToken.default(token.fontSize),
    // Size
    ...genSizeMapToken.default(token),
    // Height
    ...genControlHeight.default(token),
    // Others
    ...genCommonMapToken.default(token)
  };
}

exports.default = derivative;
//# sourceMappingURL=index.cjs.map
