import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { getNoResource2 } from "../mock.js";
//#region src/components/booking/info2/utils.ts
const getFormatResourceListAndMap = (data, bookingId = []) => {
	let resourceList = (data || {}).concat([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 = _objectSpread2(_objectSpread2({}, item), {}, { capacity: getCapacity(item) });
		map[item.id] = newItem;
		return newItem;
	});
	return {
		list: resourceList,
		listMap: map
	};
};
//#endregion
export { getFormatResourceListAndMap };
