"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _genStyleHook = require("../../theme/utils/genStyleHook");
var _index = require("../../theme/index");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
var StandardTableStyleFunc = function StandardTableStyleFunc(prefix) {
  var prepareComponentToken = function prepareComponentToken(token) {
    return {
      // fontWeight: 400,
    };
  };
  return (0, _genStyleHook.createStyleHook)(prefix, function (token) {
    var prefixCls = ".".concat(prefix);
    var rowTd = {
      '> td': {
        // borderColor: new TinyColor(token.colorPrimary).setAlpha(0.5).toRgbString(), // fade(@primary-color, 50%),
        // '&::before': {
        //   borderTop: `1px solid ${new TinyColor(token.colorPrimary).setAlpha(0.5).toRgbString()}`,
        // }
      }
    };
    return [_defineProperty(_defineProperty(_defineProperty({}, prefixCls, {
      '.spec-standard-table': {},
      '.spec-pagination': {
        // padding: `${token.paddingSM}px 0 ${token.paddingXS}px 0`,
        // background: token.colorBgBase,
      },
      '.ant-table-body': _objectSpread({}, (0, _index.scrollBar)(token)),
      '.spec-table-dropdown': {
        'li a[disabled]': {
          color: token.colorBgContainerDisabled
        }
      },
      '.ant-card-head': {
        '.ant-card-head-title-name + .spec-button-group': {
          marginLeft: token.margin + 'px'
        }
      },
      '.spec-standard-table-row-selection-block': {
        display: 'flex',
        alignItems: 'center',
        gap: token.paddingXS,
        background: token.colorInfoBg,
        padding: "".concat(token.paddingXS, "px ").concat(token.padding, "px"),
        '.spec-standard-table-row-selection-block-content': {
          flex: 1,
          display: 'flex',
          flexWrap: 'wrap',
          alignItems: 'center',
          gap: token.padding,
          '.spec-standard-table-row-selection-block-render': {
            flex: 1
          }
        },
        '.spec-standard-table-row-selection-block-cancel': {
          cursor: 'pointer',
          color: token.colorPrimary,
          marginRight: "".concat(token.padding, "px"),
          '&::before': {
            content: '""',
            display: 'inline-block',
            height: '16px',
            marginRight: "5px",
            verticalAlign: 'middle',
            borderLeft: '1px solid ' + token.colorBorder
          }
        }
      },
      '.spec-standard-table-alert': {
        marginBottom: token.marginXS + 'px'
      }
    }), '.ant-table', {
      // 固定右侧列的样式
      '.ant-table-fixed-left table.ant-table-fixed': {
        '.ant-table-thead > tr > th, .ant-table-tbody > tr > td': {
          paddingRight: token.paddingMD,
          '&:first-child': {
            paddingLeft: token.paddingMD,
            paddingRight: token.paddingMD
          }
        }
      },
      // 固定右侧列的样式
      '.ant-table-fixed-right': {
        '.ant-table-thead > tr > th, .ant-table-tbody > tr > td': {
          paddingRight: token.paddingMD,
          '&:first-child': {
            paddingLeft: token.paddingMD
          },
          '&:nth-last-child(1)': {
            paddingLeft: token.paddingMD,
            paddingRight: token.paddingMD
          }
        }
      },
      '&.ant-table-small': {
        ' > .ant-table-content > .ant-table-body > table': {
          '> .ant-table-thead > tr > th': {
            fontSize: token.fontSize,
            //@font-size-base;
            background: token.headerBg //  @table-header-bg
          },
          '> .ant-table-thead > tr > th, > .ant-table-tbody > tr > td': {
            '&:first-child': {
              paddingLeft: token.cellPaddingInline
            },
            '&:last-child': {
              paddingRight: token.cellPaddingInline
            }
          }
        }
      },
      'table': {
        fontSize: token.fontSize,
        '> .ant-table-thead > tr > th': {
          fontSize: token.fontSize
        },
        '.ant-table-thead > tr > th': {
          padding: "12px ".concat(token.paddingMD, "px"),
          '&:first-child': {
            paddingLeft: token.paddingMD
          },
          '&:last-child': {
            paddingRight: token.paddingMD
          }
        },
        '.ant-table-tbody > tr > td ': {
          padding: "12px ".concat(token.paddingMD, "px"),
          '&:first-child': {
            paddingLeft: token.paddingMD
          },
          ' &:last-child': {
            paddingRight: token.paddingMD
          }
        },
        '.ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row)': rowTd,
        '.ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row)': rowTd,
        '.ant-table-thead > tr:hover:not(.ant-table-expanded-row)': rowTd,
        '.ant-table-tbody > tr:hover:not(.ant-table-expanded-row)': rowTd
      }
    }), '.ant-form-item-control.has-error .ant-table.ant-table-small', {
      borderColor: token.colorError
    })];
  }, prepareComponentToken // 当前组件扩展的变量
  );
};
var _default = exports.default = StandardTableStyleFunc;