var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/plus/salesSdk/bookingEditService/canShowBookingEditProductButton.ts
var canShowBookingEditProductButton_exports = {};
__export(canShowBookingEditProductButton_exports, {
  canShowBookingEditProductButton: () => canShowBookingEditProductButton
});
module.exports = __toCommonJS(canShowBookingEditProductButton_exports);
var import_utils = require("../../../components/booking/info/service2/utils");
var import_utilsByBooking = require("../../../components/booking/info2/utilsByBooking");
function canShowBookingEditProductButton(options) {
  const { cacheItem, bookingState, hasOpenProductDetail } = options;
  if (!cacheItem || bookingState.channelDisabledEdit) {
    return false;
  }
  if ((0, import_utilsByBooking.getIsNoSpecAndPackage)(cacheItem)) {
    return false;
  }
  if ((0, import_utils.isBookingProduct)(cacheItem == null ? void 0 : cacheItem.extension_type)) {
    return hasOpenProductDetail;
  }
  if ((0, import_utils.isNormalProductByDurationSchedule)(cacheItem)) {
    return true;
  }
  return hasOpenProductDetail;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  canShowBookingEditProductButton
});
