const require_asyncToGenerator = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js");
const require_utils = require("../../../components/booking/info2/service/addService/utils.js");
const require_utils$1 = require("../../../components/booking/info/service2/Group/utils.js");
const require_resolveIsMultiDayProduct = require("./resolveIsMultiDayProduct.js");
//#region src/plus/salesSdk/utils/expandMultiDayCacheItem.ts
/**
* 跨日商品：拉报价并展开子预约（对齐 ticketBooking `getMultiDayCacheItem`）。
*/
function expandMultiDayCacheItem(_x, _x2, _x3) {
	return _expandMultiDayCacheItem.apply(this, arguments);
}
function _expandMultiDayCacheItem() {
	_expandMultiDayCacheItem = require_asyncToGenerator._asyncToGenerator(function* (cacheItem, bookingState, options) {
		var _cacheItem$_extend, _cacheItem$_extend2;
		if (!require_resolveIsMultiDayProduct.resolveIsMultiDayProduct(cacheItem)) return cacheItem;
		let next = yield require_utils.getMultiDay({
			start_date: (_cacheItem$_extend = cacheItem._extend) === null || _cacheItem$_extend === void 0 ? void 0 : _cacheItem$_extend.start_date,
			end_date: (_cacheItem$_extend2 = cacheItem._extend) === null || _cacheItem$_extend2 === void 0 ? void 0 : _cacheItem$_extend2.end_date,
			state: bookingState,
			cacheItem
		});
		next = require_utils$1.createBookingItemsByGroup(next);
		if (options === null || options === void 0 ? void 0 : options.concatBookings) next = require_utils$1.concatBookings(next);
		return next;
	});
	return _expandMultiDayCacheItem.apply(this, arguments);
}
//#endregion
exports.expandMultiDayCacheItem = expandMultiDayCacheItem;
