const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
//#region src/plus/salesSdk/utils/mergeCatalogDurationIntoCacheItem.ts
/**
* 规格弹窗 detail 可能缺少 `duration`，合并列表商品上的 duration 供跨日判断与 OS 转换使用。
*/
function mergeCatalogDurationIntoCacheItem(cacheItem, catalogItem) {
	var _cacheItem$duration;
	if (!(catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.duration) || (cacheItem === null || cacheItem === void 0 || (_cacheItem$duration = cacheItem.duration) === null || _cacheItem$duration === void 0 ? void 0 : _cacheItem$duration.type)) return cacheItem;
	return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, cacheItem), {}, { duration: catalogItem.duration });
}
//#endregion
exports.mergeCatalogDurationIntoCacheItem = mergeCatalogDurationIntoCacheItem;
