require("../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_platform = require("../../../utils/platform.js");
let react = require("react");
//#region src/components/table/hooks/useTransFilterSetting.ts
const useTransFilterSetting = (params) => {
	const { filter, originColumnsMap } = params;
	return (0, react.useMemo)(() => {
		if (filter && filter.show && filter.list) return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, filter), {}, { list: filter.list.map((item) => {
			let { name, label, columnKey, isCustom } = item;
			if (!isCustom && columnKey && originColumnsMap.has(columnKey)) {
				const column = originColumnsMap.get(columnKey);
				name = column.dataIndex || name;
				label = column.title || label;
			}
			return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, item), {}, {
				name,
				label,
				sort: require_platform.isMobile() ? true : item.sort
			});
		}) });
		return filter;
	}, [filter, originColumnsMap]);
};
//#endregion
exports.default = useTransFilterSetting;
