require("../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
let react = require("react");
//#region src/components/table/hooks/useTransDataSourceGroupSetting.ts
const useTransDataSourceGroupSetting = (params) => {
	const { dataSourceGroup, originColumnsMap } = params;
	return (0, react.useMemo)(() => {
		if (dataSourceGroup && dataSourceGroup.show && dataSourceGroup.list) return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, dataSourceGroup), {}, { list: dataSourceGroup.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
			});
		}) });
		return dataSourceGroup;
	}, [dataSourceGroup, originColumnsMap]);
};
//#endregion
exports.default = useTransDataSourceGroupSetting;
