import { isNormalProductByDurationSchedule } from "../../../components/booking/info/service2/utils.js";
import { createLegacyOpenProductDetailHost } from "../demo/hosts/legacyOpenProductDetail.js";
import { createOpenNormalProductDetailHost } from "../normalProductDetail/createOpenNormalProductDetailHost.js";
//#region src/plus/salesSdk/hosts/createCompositeOpenProductDetailHost.ts
/**
* 组合商品详情 Host：普通商品走 SkuDetailModal，预约商品走 legacy Info2 弹窗。
* 对齐 ticketBooking `openProductModal` 分支逻辑。
*/
function createCompositeOpenProductDetailHost(deps) {
	const legacyHost = createLegacyOpenProductDetailHost(deps);
	const normalHost = createOpenNormalProductDetailHost();
	return (payload) => {
		var _payload$productData;
		if (isNormalProductByDurationSchedule((_payload$productData = payload.productData) !== null && _payload$productData !== void 0 ? _payload$productData : payload.item)) return normalHost(payload);
		return legacyHost(payload);
	};
}
//#endregion
export { createCompositeOpenProductDetailHost };
