import { isNumber } from "@pisell/utils";
import { getValueByKeys } from "../../utils";
export default function (_ref) {
  var value = _ref.value,
    key = _ref.key,
    item = _ref.item;
  // 如果value为空，则不过滤
  if (!value || !isNumber(value.min) || !isNumber(value.max)) {
    return true;
  }
  var dataValue = getValueByKeys(item, key);
  if ((value === null || value === void 0 ? void 0 : value.max) >= (value === null || value === void 0 ? void 0 : value.min)) {
    return dataValue >= (value === null || value === void 0 ? void 0 : value.min) && dataValue <= (value === null || value === void 0 ? void 0 : value.max);
  }
  return true;
}