'use strict';

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

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

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.js.map
