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

'use strict';

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

var isFunction = require('lodash/isFunction');
var isNumber = require('lodash/isNumber');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var isFunction__default = /*#__PURE__*/_interopDefaultLegacy(isFunction);
var isNumber__default = /*#__PURE__*/_interopDefaultLegacy(isNumber);

function isRowSelectedDisabled(selectColumn, row, rowIndex) {
  var disabled = isFunction__default["default"](selectColumn.disabled) ? selectColumn.disabled({
    row: row,
    rowIndex: rowIndex
  }) : selectColumn.disabled;
  if (selectColumn.checkProps) {
    if (isFunction__default["default"](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__default["default"](attr) ? attr : parseFloat(attr);
}

exports.getColWidthAttr = getColWidthAttr;
exports.isRowSelectedDisabled = isRowSelectedDisabled;
//# sourceMappingURL=utils.js.map
