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/components/ticketBooking/utils/menuListIds.ts
var menuListIds_exports = {};
__export(menuListIds_exports, {
  getEffectiveMenuListIds: () => getEffectiveMenuListIds,
  normalizeMenuListIds: () => normalizeMenuListIds
});
module.exports = __toCommonJS(menuListIds_exports);
function normalizeMenuListIds(raw) {
  if (!Array.isArray(raw)) return [];
  const out = [];
  for (const x of raw) {
    const n = Number(x);
    if (Number.isFinite(n) && n > 0) out.push(Math.floor(n));
  }
  return [...new Set(out)];
}
function getEffectiveMenuListIds(state) {
  var _a, _b, _c;
  const override = state == null ? void 0 : state.associated_menu_list_ids;
  if (Array.isArray(override) && override.length > 0) {
    return normalizeMenuListIds(override);
  }
  const fromBoard = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.menu_list_tab) == null ? void 0 : _c.menu_list;
  return normalizeMenuListIds(fromBoard);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getEffectiveMenuListIds,
  normalizeMenuListIds
});
