const require_utilsByBooking = require("../../../components/booking/info2/utilsByBooking.js");
const require_utils = require("../../../components/booking/info/service2/utils.js");
//#region src/plus/salesSdk/bookingEditService/canShowBookingEditProductButton.ts
/**
* 资源编辑抽屉是否展示「编辑商品」按钮。
*/
function canShowBookingEditProductButton(options) {
	const { cacheItem, bookingState, hasOpenProductDetail } = options;
	if (!cacheItem || bookingState.channelDisabledEdit) return false;
	if (require_utilsByBooking.getIsNoSpecAndPackage(cacheItem)) return false;
	if (require_utils.isBookingProduct(cacheItem === null || cacheItem === void 0 ? void 0 : cacheItem.extension_type)) return hasOpenProductDetail;
	if (require_utils.isNormalProductByDurationSchedule(cacheItem)) return true;
	return hasOpenProductDetail;
}
//#endregion
exports.canShowBookingEditProductButton = canShowBookingEditProductButton;
