import genFontSizes from './genFontSizes';
export default function genCommonMapToken(token) {
  var motionUnit = token.motionUnit,
      motionBase = token.motionBase,
      fontSizeBase = token.fontSizeBase,
      sizeUnit = token.sizeUnit,
      sizeBaseStep = token.sizeBaseStep,
      gridUnit = token.gridUnit,
      gridBaseStep = token.gridBaseStep,
      radiusBase = token.radiusBase,
      controlHeight = token.controlHeight,
      lineWidth = token.lineWidth;
  var fontSizes = genFontSizes(fontSizeBase);
  return {
    // motion
    motionDurationFast: "".concat((motionBase + motionUnit * 1).toFixed(1), "s"),
    motionDurationMid: "".concat((motionBase + motionUnit * 2).toFixed(1), "s"),
    motionDurationSlow: "".concat((motionBase + motionUnit * 3).toFixed(1), "s"),
    // font
    fontSizes: fontSizes.map(function (fs) {
      return fs.size;
    }),
    lineHeights: fontSizes.map(function (fs) {
      return fs.lineHeight;
    }),
    // size
    sizeSpaceSM: sizeUnit * (sizeBaseStep - 1),
    sizeSpace: sizeUnit * sizeBaseStep,
    sizeSpaceXS: sizeUnit * (sizeBaseStep - 2),
    sizeSpaceXXS: sizeUnit * (sizeBaseStep - 3),
    // grid
    gridSpaceSM: gridUnit * (gridBaseStep - 1),
    gridSpaceBase: gridUnit * gridBaseStep,
    gridSpaceLG: gridUnit * (gridBaseStep + 1),
    gridSpaceXL: gridUnit * (gridBaseStep + 2),
    gridSpaceXXL: gridUnit * (gridBaseStep + 5),
    // line
    lineWidthBold: lineWidth + 1,
    // radius
    radiusSM: radiusBase / 2,
    radiusLG: radiusBase * 2,
    radiusXL: radiusBase * 4,
    // control
    controlHeightSM: controlHeight * 0.75,
    controlHeightXS: controlHeight * 0.5,
    controlHeightLG: controlHeight * 1.25
  };
}