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/pisellReservation/data/associatedMenuListIdsFromOpenData.ts
var associatedMenuListIdsFromOpenData_exports = {};
__export(associatedMenuListIdsFromOpenData_exports, {
  mapAssociatedMenusToMenuListIds: () => mapAssociatedMenusToMenuListIds
});
module.exports = __toCommonJS(associatedMenuListIdsFromOpenData_exports);
function mapAssociatedMenusToMenuListIds(openData) {
  if (!openData || typeof openData !== "object") return [];
  const o = openData;
  const menuSection = o.menu ?? o["menu"];
  const raw = (menuSection && typeof menuSection === "object" && menuSection.associated_menus) ?? o["menu.associated_menus"] ?? o.associated_menus;
  if (!Array.isArray(raw)) return [];
  const ids = [];
  for (const item of raw) {
    if (item != null && typeof item === "object" && "value" in item) {
      const n = Number(item.value);
      if (Number.isFinite(n) && n > 0) ids.push(Math.floor(n));
    } else {
      const n = Number(item);
      if (Number.isFinite(n) && n > 0) ids.push(Math.floor(n));
    }
  }
  return [...new Set(ids)];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  mapAssociatedMenusToMenuListIds
});
