const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_mock = require("../mock.js");
//#region src/components/booking/info2/utils.ts
const getFormatResourceListAndMap = (data, bookingId = []) => {
	let resourceList = (data || {}).concat([require_mock.getNoResource2({})]);
	const map = resourceList.reduce((prev, item) => {
		prev[item.id] = item;
		return prev;
	}, {});
	const getCapacity = (item) => {
		return item.capacity;
	};
	resourceList = resourceList.map((item) => {
		const newItem = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, item), {}, { capacity: getCapacity(item) });
		map[item.id] = newItem;
		return newItem;
	});
	return {
		list: resourceList,
		listMap: map
	};
};
//#endregion
exports.getFormatResourceListAndMap = getFormatResourceListAndMap;
