import { getValueByKeys } from "../../utils/index.js";
import { isArr } from "@pisell/utils";
//#region src/components/table/Table/fields/select/filterUtil/index.ts
function filterUtil_default({ value, key, item }) {
	if (!value || Array.isArray(value) && value.length === 0) return true;
	const dataValue = getValueByKeys(item, key);
	if (isArr(value)) return value.includes(dataValue);
	if (isArr(dataValue)) return dataValue.includes(value);
	return value === dataValue;
}
//#endregion
export { filterUtil_default as default };
