import _extends from "@babel/runtime/helpers/esm/extends";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

var genSizeStyle = function genSizeStyle(token) {
  var componentCls = token.componentCls;

  var getSizeStyle = function getSizeStyle(size, paddingVertical, paddingHorizontal, fontSize) {
    var _$concat$concat$conca;

    return _defineProperty({}, "".concat(componentCls).concat(componentCls, "-").concat(size), (_$concat$concat$conca = {
      fontSize: fontSize
    }, _defineProperty(_$concat$concat$conca, "\n        ".concat(componentCls, "-title,\n        ").concat(componentCls, "-footer,\n        ").concat(componentCls, "-thead > tr > th,\n        ").concat(componentCls, "-tbody > tr > td,\n        tfoot > tr > th,\n        tfoot > tr > td\n      "), {
      padding: "".concat(paddingVertical, "px ").concat(paddingHorizontal, "px")
    }), _defineProperty(_$concat$concat$conca, "".concat(componentCls, "-filter-trigger"), {
      marginInlineEnd: "-".concat(paddingHorizontal / 2, "px")
    }), _defineProperty(_$concat$concat$conca, "".concat(componentCls, "-expanded-row-fixed"), {
      margin: "-".concat(paddingVertical, "px -").concat(paddingHorizontal, "px")
    }), _defineProperty(_$concat$concat$conca, "".concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-wrapper:only-child ").concat(componentCls), {
      marginBlock: "-".concat(paddingVertical, "px"),
      marginInline: "".concat(token.tableExpandColumnWidth - paddingHorizontal, "px -").concat(paddingHorizontal, "px")
    })), _defineProperty(_$concat$concat$conca, "".concat(componentCls, "-selection-column"), {
      paddingInlineStart: "".concat(paddingHorizontal / 4, "px")
    }), _$concat$concat$conca));
  };

  return _defineProperty({}, "".concat(componentCls, "-wrapper"), _extends(_extends({}, getSizeStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle, token.tableFontSizeMiddle)), getSizeStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall, token.tableFontSizeSmall)));
};

export default genSizeStyle;