/**
 * ldesign v0.3.13
 * (c) 2023 ldesign
 * @license MIT
 */

import isFunction from 'lodash/isFunction';
import isNumber from 'lodash/isNumber';

function isRowSelectedDisabled(selectColumn, row, rowIndex) {
  var disabled = isFunction(selectColumn.disabled) ? selectColumn.disabled({
    row: row,
    rowIndex: rowIndex
  }) : selectColumn.disabled;
  if (selectColumn.checkProps) {
    if (isFunction(selectColumn.checkProps)) {
      disabled = disabled || selectColumn.checkProps({
        row: row,
        rowIndex: rowIndex
      }).disabled;
    } else if (selectColumn.checkProps === "object") {
      disabled = disabled || selectColumn.checkProps.disabled;
    }
  }
  return !!disabled;
}
function getColWidthAttr(col, attrKey) {
  var attr = col[attrKey];
  return isNumber(attr) ? attr : parseFloat(attr);
}

export { getColWidthAttr, isRowSelectedDisabled };
//# sourceMappingURL=utils.js.map
