const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../../utils/index.js");
let _pisell_utils = require("@pisell/utils");
let dayjs = require("dayjs");
dayjs = require_runtime.__toESM(dayjs);
//#region src/components/table/Table/fields/date/filterUtil/index.ts
/**
* 判断filters和dataSource日期是否为同一天
* @param value 日期字符串或Dayjs对象
* @param key 键名
* @param item 对象
* @returns 若两个日期为同一天则返回true，否则返回false
*/
function filterUtil_default({ value, key, item }) {
	if (!value) return true;
	const valueDayjsObj = (0, dayjs.default)(value);
	if (!valueDayjsObj.isValid()) return true;
	const dataValue = require_index.getValueByKeys(item, key);
	if ((0, _pisell_utils.isUndefined)(dataValue)) return false;
	const dataDayjsObj = (0, dayjs.default)(dataValue);
	if (!dataDayjsObj.isValid()) return false;
	return dataDayjsObj.isSame(valueDayjsObj, "day");
}
//#endregion
exports.default = filterUtil_default;
