import { getValueByKeys } from "../../utils/index.js";
import { isNumber, isString } from "@pisell/utils";
//#region src/components/table/Table/fields/text/filterUtil/index.ts
function filterUtil_default({ value, key, item }) {
	if (!isString(value)) return true;
	if (key === "keywords") return JSON.stringify(item).includes(value);
	const dataValue = getValueByKeys(item, key);
	if (isString(dataValue) || isNumber(dataValue)) return `${dataValue}`.includes(value);
}
//#endregion
export { filterUtil_default as default };
