//#region src/components/booking/components/voucher/utils.ts
const getServiceAddons = (list) => {
	const serviceList = [];
	const addonsList = [];
	list.forEach((item) => {
		if (item.isAddons) addonsList.push(item);
		else serviceList.push(item);
	});
	return {
		serviceList,
		addonsList
	};
};
const hasEveryBookingId = (list) => {
	return list.every((item) => {
		var _item$_extend, _item$_extend$every;
		return item.booking_id && ((_item$_extend = item._extend) === null || _item$_extend === void 0 || (_item$_extend = _item$_extend.other) === null || _item$_extend === void 0 || (_item$_extend = _item$_extend.bundle) === null || _item$_extend === void 0 || (_item$_extend$every = _item$_extend.every) === null || _item$_extend$every === void 0 ? void 0 : _item$_extend$every.call(_item$_extend, (bundle) => bundle.booking_id));
	});
};
//#endregion
exports.getServiceAddons = getServiceAddons;
exports.hasEveryBookingId = hasEveryBookingId;
