var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/plus/pisellReservation/floorMap/reservationMock.ts
var reservationMock_exports = {};
__export(reservationMock_exports, {
  RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND: () => RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND,
  RESERVATION_BOUND_TABLE_ELEMENT_KIND: () => RESERVATION_BOUND_TABLE_ELEMENT_KIND,
  applyReservationFloorMapLiveLabels: () => applyReservationFloorMapLiveLabels,
  defaultReservationSceneElements: () => defaultReservationSceneElements,
  defaultReservationTableRows: () => defaultReservationTableRows,
  getDefaultReservationFloorMapConfig: () => getDefaultReservationFloorMapConfig,
  getReservationDataSourceFormColumns: () => getReservationDataSourceFormColumns,
  getReservationFloorMapShellConfig: () => getReservationFloorMapShellConfig,
  mergeFloorMapElementKindCategoriesWithDefaults: () => mergeFloorMapElementKindCategoriesWithDefaults,
  mergeFloorMapElementKindsWithDefaults: () => mergeFloorMapElementKindsWithDefaults,
  reservationDataSourcePlacements: () => reservationDataSourcePlacements,
  reservationPlacementsToSceneElements: () => reservationPlacementsToSceneElements
});
module.exports = __toCommonJS(reservationMock_exports);
var import_materials = require("@pisell/materials");
var import_utils = require("@pisell/utils");
var import_locales = __toESM(require("../locales/locales"));
var PALETTE_IMAGE_BG_I18N_KEY = "pisell-reservation.floor-map.palette-image-bg";
var LEGACY_PALETTE_IMAGE_BG_LABELS = /* @__PURE__ */ new Set([
  import_locales.default.en[PALETTE_IMAGE_BG_I18N_KEY],
  import_locales.default["zh-CN"][PALETTE_IMAGE_BG_I18N_KEY],
  import_locales.default["zh-HK"][PALETTE_IMAGE_BG_I18N_KEY],
  "图片（底图）"
]);
var I18N_FLOOR_CATEGORY_BG = "pisell-reservation.floor-map.category-background";
var I18N_FLOOR_DS_LABEL = "pisell-reservation.floor-map.data-source-label";
var I18N_PALETTE_IMAGE_BG = PALETTE_IMAGE_BG_I18N_KEY;
var I18N_PALETTE_BUILTIN_SHAPE = "pisell-floor-map-layout.palette.builtin-shape";
var I18N_ROOM_KIND_BOUND = "pisell-reservation.room-kind-bound";
var I18N_ROOM_KIND_BOUND_ROUND = "pisell-reservation.room-kind-bound-round";
var LEGACY_IMAGE_ELEMENT_KIND_VALUES = /* @__PURE__ */ new Set([
  "image",
  "floorMapBg",
  "floor_map_image"
]);
function stripConflictingImageElementKinds(kinds) {
  return kinds.filter((k) => {
    if (LEGACY_IMAGE_ELEMENT_KIND_VALUES.has(k.value)) return false;
    if (k.value !== import_materials.FLOOR_MAP_IMAGE_ELEMENT_KIND && LEGACY_PALETTE_IMAGE_BG_LABELS.has(k.label)) {
      return false;
    }
    return true;
  });
}
function dedupeElementKindsByValue(kinds) {
  const seen = /* @__PURE__ */ new Set();
  return kinds.filter((k) => {
    if (seen.has(k.value)) return false;
    seen.add(k.value);
    return true;
  });
}
function mergeFloorMapElementKindsWithDefaults(defaults, remote) {
  if (!(remote == null ? void 0 : remote.length)) return defaults;
  const defaultByValue = new Map(defaults.map((d) => [d.value, d]));
  const base = dedupeElementKindsByValue(
    stripConflictingImageElementKinds(remote)
  ).filter((k) => k.value !== import_materials.FLOOR_MAP_IMAGE_ELEMENT_KIND).filter((k) => k.value !== import_materials.FLOOR_MAP_BUILTIN_SHAPE_ELEMENT_KIND).filter((k) => !LEGACY_RESERVATION_TABLE_KIND_VALUES.has(k.value)).map((k) => {
    const d = defaultByValue.get(k.value);
    if (!d) return k;
    return {
      ...d,
      ...k,
      nameAsTitleConfigurable: k.nameAsTitleConfigurable ?? d.nameAsTitleConfigurable
    };
  });
  const seen = new Set(base.map((k) => k.value));
  const out = [...base];
  for (const d of defaults) {
    if (!seen.has(d.value)) {
      out.push(d);
      seen.add(d.value);
    }
  }
  return dedupeElementKindsByValue(out);
}
function mergeFloorMapElementKindCategoriesWithDefaults(defaults, remote) {
  if (!(remote == null ? void 0 : remote.length)) return defaults;
  const defaultOrderById = new Map(
    defaults.map((d) => [d.id, d.order ?? 0])
  );
  const seen = new Set(remote.map((c) => c.id));
  const out = [...remote];
  for (const d of defaults) {
    if (!seen.has(d.id)) {
      out.push(d);
      seen.add(d.id);
    }
  }
  return [...out].map(
    (c) => defaultOrderById.has(c.id) ? { ...c, order: defaultOrderById.get(c.id) } : c
  ).sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
}
function applyReservationFloorMapLiveLabels(config) {
  var _a, _b;
  const nextCats = (_a = config.elementKindCategories) == null ? void 0 : _a.map((c) => {
    if (c.id === "background") {
      return { ...c, label: import_utils.locales.getText(I18N_FLOOR_CATEGORY_BG) };
    }
    if (c.id === "dining") {
      return { ...c, label: import_utils.locales.getText(I18N_FLOOR_DS_LABEL) };
    }
    return c;
  });
  const nextKinds = (_b = config.elementKinds) == null ? void 0 : _b.map((k) => {
    if (k.value === import_materials.FLOOR_MAP_IMAGE_ELEMENT_KIND) {
      return { ...k, label: import_utils.locales.getText(I18N_PALETTE_IMAGE_BG) };
    }
    if (k.value === import_materials.FLOOR_MAP_BUILTIN_SHAPE_ELEMENT_KIND) {
      return { ...k, label: import_utils.locales.getText(I18N_PALETTE_BUILTIN_SHAPE) };
    }
    if (k.value === RESERVATION_BOUND_TABLE_ELEMENT_KIND) {
      return { ...k, label: import_utils.locales.getText(I18N_ROOM_KIND_BOUND) };
    }
    if (k.value === RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND) {
      return { ...k, label: import_utils.locales.getText(I18N_ROOM_KIND_BOUND_ROUND) };
    }
    return k;
  });
  return {
    ...config,
    elementKindCategories: nextCats ?? config.elementKindCategories,
    elementKinds: nextKinds ?? config.elementKinds
  };
}
var RESERVATION_CANVAS_NAME_MAIN = {
  en: "Main Area",
  "zh-CN": "主区域",
  "zh-HK": "主區域",
  ja: "Main Area",
  pt: "Main Area"
};
var RESERVATION_CANVAS_NAME_SECONDARY = {
  en: "Secondary Area",
  "zh-CN": "副区域",
  "zh-HK": "副區域",
  ja: "Secondary Area",
  pt: "Secondary Area"
};
var RESERVATION_CANVAS_NAME_VIP = {
  en: "VIP Area",
  "zh-CN": "VIP 区",
  "zh-HK": "VIP 區",
  ja: "VIP Area",
  pt: "VIP Area"
};
var RESERVATION_BOUND_TABLE_ELEMENT_KIND = "reservationBoundTable";
var RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND = "reservationBoundRoundTable";
var LEGACY_RESERVATION_TABLE_KIND_VALUES = /* @__PURE__ */ new Set([
  "reservationTable",
  "reservationPartyBench",
  "reservationBarSeat"
]);
var defaultReservationTableRows = [
  {
    id: "t1",
    code: "VIP 1号厅",
    area: "Main",
    cardStatus: "occupied",
    guestName: "张总",
    guestPhone: "135****6789",
    time: "13:00",
    timeEnd: "15:30",
    partySize: 8,
    capacityLabel: "12",
    priceDisplay: "$ 1288",
    isPaid: true,
    delayMinutes: 13,
    progress: 0.62,
    progressTone: "warning",
    nextGuest: "Alex",
    nextTime: "14:30"
  },
  {
    id: "t2",
    code: "T-2",
    area: "Main",
    cardStatus: "occupied",
    guestName: "Tom",
    guestPhone: "138****1024",
    time: "13:30",
    partySize: 4,
    priceDisplay: "$ 680",
    isPaid: false,
    topAccentOrange: true,
    elapsedLabel: "1h45m",
    progress: 0.35,
    progressTone: "success"
  },
  {
    id: "t3",
    code: "T-3",
    area: "Main",
    cardStatus: "booked",
    guestName: "Grace",
    time: "14:08",
    partySize: 5,
    startsInMinutes: 8
  },
  {
    id: "t4",
    code: "T-4",
    area: "Main",
    cardStatus: "booked",
    guestName: "Rachel Wu",
    guestPhone: "186****5511",
    time: "14:00",
    partySize: 4,
    lateMinutes: 8,
    nextGuest: "David",
    nextTime: "15:00"
  },
  {
    id: "t5",
    code: "T-5",
    area: "Main",
    cardStatus: "booked",
    guestName: "Sophia",
    time: "12:00",
    partySize: 4
  },
  {
    id: "t6",
    code: "大包 C2",
    area: "Main",
    cardStatus: "booked",
    capacityLabel: "10",
    slots: [
      { name: "James", time: "10:00-12:00", progress: 0.45 },
      { name: "Wang Li", time: "12:30-14:00", progress: 0.28 }
    ],
    moreCount: 4
  },
  {
    id: "t7",
    code: "T-7",
    area: "Main",
    cardStatus: "available"
  },
  {
    id: "t8",
    code: "T-8",
    area: "Main",
    cardStatus: "maintenance",
    capacityLabel: "6p"
  },
  {
    id: "p1",
    code: "P-1",
    area: "Private",
    cardStatus: "occupied",
    slots: [
      { name: "Michael", time: "13:45" },
      { name: "Grace", time: "14:00" }
    ],
    moreCount: 3
  },
  {
    id: "p2",
    code: "P-2",
    area: "Private",
    cardStatus: "booked",
    guestName: "Mark",
    time: "13:00",
    partySize: 2
  },
  {
    id: "b1",
    code: "B-1",
    area: "Bar",
    cardStatus: "barBusy",
    time: "14:00",
    partySize: 2,
    barRemainingLabel: "1h10m"
  },
  {
    id: "b2",
    code: "B-2",
    area: "Bar",
    cardStatus: "occupied",
    time: "13:45",
    partySize: 1,
    barRemainingLabel: "55m"
  },
  {
    id: "b3",
    code: "B-3",
    area: "Bar",
    cardStatus: "booked",
    time: "13:30",
    partySize: 4
  },
  {
    id: "b4",
    code: "B-4",
    area: "Bar",
    cardStatus: "occupied",
    barSlots: [
      { name: "Sarah", time: "13:50" },
      { name: "Kevin", time: "14:15" }
    ]
  },
  {
    id: "b5",
    code: "B-5",
    area: "Bar",
    cardStatus: "available"
  },
  {
    id: "b6",
    code: "B-6",
    area: "Bar",
    cardStatus: "booked",
    time: "13:30",
    partySize: 4
  },
  {
    id: "b7",
    code: "B-7",
    area: "Bar",
    cardStatus: "maintenance"
  },
  // --- 大屏资源墙演示：名称带 Mock· 前缀，便于在筛选里勾选对比 ---
  {
    id: "mock-rw-available",
    code: "Mock·空场(绿)",
    area: "WallDemo",
    cardStatus: "available"
  },
  {
    id: "mock-rw-ending",
    code: "Mock·将结束(橙)",
    area: "WallDemo",
    cardStatus: "occupied",
    guestName: "倒计时≤10分",
    time: "14:00",
    delayMinutes: 56
  },
  {
    id: "mock-rw-expired",
    code: "Mock·已超时(红)",
    area: "WallDemo",
    cardStatus: "occupied",
    guestName: "应已清场",
    time: "11:00",
    delayMinutes: 60
  },
  {
    id: "mock-rw-maint",
    code: "Mock·维护态",
    area: "WallDemo",
    cardStatus: "maintenance",
    capacityLabel: "8p"
  },
  {
    id: "mock-rw-lights-off",
    code: "Mock·灯已关",
    area: "WallDemo",
    cardStatus: "occupied",
    guestName: "场上无人",
    time: "13:00",
    delayMinutes: 30,
    resourceWallLightState: "off"
  },
  {
    id: "mock-rw-lights-off-soon",
    code: "Mock·即将关灯",
    area: "WallDemo",
    cardStatus: "occupied",
    guestName: "场上进行中",
    time: "15:00",
    delayMinutes: 25,
    resourceWallLightState: "on_soon_off",
    resourceWallLightOffInMin: 6
  },
  {
    id: "mock-rw-lights-on-soon",
    code: "Mock·即将开灯",
    area: "WallDemo",
    cardStatus: "booked",
    guestName: "下一场将开",
    time: "16:00",
    startsInMinutes: 12,
    resourceWallLightState: "off_soon_on",
    resourceWallLightOnInMin: 8,
    nextGuest: "下一场·李娜",
    nextTime: "16:00"
  }
];
var DS = "tables";
var CANVAS_MAIN = "main";
function getReservationElementKindCategories() {
  return [
    {
      id: "dining",
      label: import_utils.locales.getText(I18N_FLOOR_DS_LABEL),
      order: 0
    },
    {
      id: "background",
      label: import_utils.locales.getText(I18N_FLOOR_CATEGORY_BG),
      order: 1
    }
  ];
}
function getReservationPaletteElementKinds() {
  return [
    {
      value: import_materials.FLOOR_MAP_IMAGE_ELEMENT_KIND,
      label: import_utils.locales.getText(I18N_PALETTE_IMAGE_BG),
      categoryId: "background",
      dataBindingPolicy: "none",
      showInPalette: true
    },
    {
      /**
       * 内置图形图元：与图片图元并列在「装饰」分类下，但用 `builtinShapeKey` 在内置
       * 预设（厕所/分隔/柱子/沙发/大门）中选择，无需 URL，落点即可见图形。
       */
      value: import_materials.FLOOR_MAP_BUILTIN_SHAPE_ELEMENT_KIND,
      label: import_utils.locales.getText(I18N_PALETTE_BUILTIN_SHAPE),
      categoryId: "background",
      dataBindingPolicy: "none",
      showInPalette: true
    },
    {
      value: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
      label: import_utils.locales.getText(I18N_ROOM_KIND_BOUND),
      categoryId: "dining",
      dataBindingPolicy: "optional",
      allowedDataSourceKeys: [DS],
      showInPalette: true,
      /**
       * 允许编辑面板出现「将图元名作为资源标题」勾选项；
       * 不勾选时仍按 row.main_field / row.code 为主，行为与历史一致。
       */
      nameAsTitleConfigurable: true
    },
    {
      value: RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND,
      label: import_utils.locales.getText(I18N_ROOM_KIND_BOUND_ROUND),
      categoryId: "dining",
      dataBindingPolicy: "optional",
      allowedDataSourceKeys: [DS],
      defaultShape: "circle",
      showInPalette: true,
      nameAsTitleConfigurable: true
    }
  ];
}
var CANVAS_SECONDARY = "secondary";
var CANVAS_VIP = "vip";
var defaultReservationSceneElements = [
  {
    instanceId: "res_t1",
    canvasId: CANVAS_MAIN,
    x: 40,
    y: 40,
    width: 150,
    height: 100,
    name: "T-1",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "t1" }
  },
  {
    instanceId: "res_t2",
    canvasId: CANVAS_MAIN,
    x: 210,
    y: 40,
    width: 150,
    height: 100,
    name: "T-2",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "t2" }
  },
  {
    instanceId: "res_t3",
    canvasId: CANVAS_MAIN,
    x: 380,
    y: 40,
    width: 150,
    height: 100,
    name: "T-3",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "t3" }
  },
  {
    instanceId: "res_p2",
    canvasId: CANVAS_MAIN,
    x: 550,
    y: 40,
    width: 140,
    height: 100,
    name: "P-2",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "p2" }
  },
  {
    instanceId: "res_t4",
    canvasId: CANVAS_MAIN,
    x: 40,
    y: 170,
    width: 150,
    height: 100,
    name: "T-4",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "t4" }
  },
  {
    instanceId: "res_t5",
    canvasId: CANVAS_MAIN,
    x: 210,
    y: 170,
    width: 150,
    height: 100,
    name: "T-5",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "t5" }
  },
  {
    instanceId: "res_t6",
    canvasId: CANVAS_MAIN,
    x: 380,
    y: 170,
    width: 150,
    height: 100,
    name: "T-6",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "t6" }
  },
  {
    instanceId: "res_p1",
    canvasId: CANVAS_MAIN,
    x: 710,
    y: 40,
    width: 240,
    height: 240,
    name: "P-1",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "p1" }
  },
  {
    instanceId: "res_t7",
    canvasId: CANVAS_MAIN,
    x: 40,
    y: 300,
    width: 150,
    height: 100,
    name: "T-7",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "t7" }
  },
  {
    instanceId: "res_t8",
    canvasId: CANVAS_MAIN,
    x: 210,
    y: 300,
    width: 150,
    height: 100,
    name: "T-8",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "t8" }
  },
  {
    instanceId: "res_b1",
    canvasId: CANVAS_MAIN,
    x: 40,
    y: 440,
    width: 90,
    height: 90,
    name: "B-1",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "b1" }
  },
  {
    instanceId: "res_b2",
    canvasId: CANVAS_MAIN,
    x: 150,
    y: 440,
    width: 90,
    height: 90,
    name: "B-2",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "b2" }
  },
  {
    instanceId: "res_b3",
    canvasId: CANVAS_MAIN,
    x: 260,
    y: 440,
    width: 90,
    height: 90,
    name: "B-3",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "b3" }
  },
  {
    instanceId: "res_b4",
    canvasId: CANVAS_MAIN,
    x: 370,
    y: 440,
    width: 90,
    height: 90,
    name: "B-4",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "b4" }
  },
  {
    instanceId: "res_b5",
    canvasId: CANVAS_MAIN,
    x: 480,
    y: 440,
    width: 90,
    height: 90,
    name: "B-5",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "b5" }
  },
  {
    instanceId: "res_b6",
    canvasId: CANVAS_MAIN,
    x: 590,
    y: 440,
    width: 90,
    height: 90,
    name: "B-6",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "b6" }
  },
  {
    instanceId: "res_b7",
    canvasId: CANVAS_MAIN,
    x: 700,
    y: 440,
    width: 90,
    height: 90,
    name: "B-7",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "b7" }
  },
  // 与 defaultReservationTableRows 中 mock-rw-* 对齐，进入日历/资源墙资源顺序与平面图绑定
  {
    instanceId: "res_mock_rw_available",
    canvasId: CANVAS_MAIN,
    x: 30,
    y: 560,
    width: 100,
    height: 80,
    name: "Mock·空场",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "mock-rw-available" }
  },
  {
    instanceId: "res_mock_rw_ending",
    canvasId: CANVAS_MAIN,
    x: 148,
    y: 560,
    width: 100,
    height: 80,
    name: "Mock·将结束",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "mock-rw-ending" }
  },
  {
    instanceId: "res_mock_rw_expired",
    canvasId: CANVAS_MAIN,
    x: 266,
    y: 560,
    width: 100,
    height: 80,
    name: "Mock·超时",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "mock-rw-expired" }
  },
  {
    instanceId: "res_mock_rw_maint",
    canvasId: CANVAS_MAIN,
    x: 384,
    y: 560,
    width: 100,
    height: 80,
    name: "Mock·维护",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "mock-rw-maint" }
  },
  {
    instanceId: "res_mock_rw_lights_off",
    canvasId: CANVAS_MAIN,
    x: 502,
    y: 560,
    width: 100,
    height: 80,
    name: "Mock·灯关",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "mock-rw-lights-off" }
  },
  {
    instanceId: "res_mock_rw_lights_off_soon",
    canvasId: CANVAS_MAIN,
    x: 620,
    y: 560,
    width: 100,
    height: 80,
    name: "Mock·将关灯",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "mock-rw-lights-off-soon" }
  },
  {
    instanceId: "res_mock_rw_lights_on_soon",
    canvasId: CANVAS_MAIN,
    x: 738,
    y: 560,
    width: 100,
    height: 80,
    name: "Mock·将开灯",
    zIndex: 0,
    elementKind: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
    dataBinding: { dataSourceKey: DS, recordId: "mock-rw-lights-on-soon" }
  }
];
var reservationDataSourcePlacements = defaultReservationSceneElements.map((el) => {
  const placement = {
    dataSourceKey: el.dataBinding.dataSourceKey,
    id: String(el.dataBinding.recordId),
    floorMapId: el.canvasId,
    x: el.x,
    y: el.y,
    name: String(el.name ?? ""),
    width: el.width,
    height: el.height,
    elementKind: String(el.elementKind ?? "")
  };
  if (el.shape === "circle") placement.shape = "circle";
  return placement;
});
function cloneSceneElements(els) {
  return els.map((el) => ({
    ...el,
    dataBinding: el.dataBinding ? { ...el.dataBinding } : void 0
  }));
}
function reservationPlacementsToSceneElements(placements) {
  return placements.map((p) => {
    const el = {
      instanceId: `res_${p.id}`,
      canvasId: p.floorMapId,
      x: p.x,
      y: p.y,
      width: p.width,
      height: p.height,
      name: p.name,
      zIndex: 0,
      elementKind: p.elementKind,
      dataBinding: {
        dataSourceKey: p.dataSourceKey,
        recordId: p.id
      }
    };
    if (p.shape === "circle") el.shape = "circle";
    return el;
  });
}
function getReservationFloorMapShellConfig() {
  return {
    canvases: [
      {
        id: CANVAS_MAIN,
        name: RESERVATION_CANVAS_NAME_MAIN,
        order: 0,
        enabled: true
      },
      {
        id: CANVAS_SECONDARY,
        name: RESERVATION_CANVAS_NAME_SECONDARY,
        order: 1,
        enabled: true
      },
      {
        id: CANVAS_VIP,
        name: RESERVATION_CANVAS_NAME_VIP,
        order: 2,
        enabled: true
      }
    ],
    canvasUi: { canCreate: true, canEdit: true },
    elementKindCategories: getReservationElementKindCategories(),
    elementKinds: getReservationPaletteElementKinds(),
    sceneElements: []
  };
}
function getDefaultReservationFloorMapConfig() {
  return {
    canvases: [
      {
        id: CANVAS_MAIN,
        name: RESERVATION_CANVAS_NAME_MAIN,
        order: 0,
        enabled: true
      },
      {
        id: CANVAS_SECONDARY,
        name: RESERVATION_CANVAS_NAME_SECONDARY,
        order: 1,
        enabled: true
      },
      {
        id: CANVAS_VIP,
        name: RESERVATION_CANVAS_NAME_VIP,
        order: 2,
        enabled: true
      }
    ],
    canvasUi: { canCreate: true, canEdit: true },
    elementKindCategories: getReservationElementKindCategories(),
    elementKinds: getReservationPaletteElementKinds(),
    sceneElements: cloneSceneElements(defaultReservationSceneElements)
  };
}
function getReservationDataSourceFormColumns() {
  return [
    {
      key: "code",
      label: import_utils.locales.getText("pisell-reservation.grid.code"),
      type: "string"
    },
    {
      key: "guestName",
      label: import_utils.locales.getText("pisell-reservation.grid.guest"),
      type: "string"
    },
    {
      key: "time",
      label: import_utils.locales.getText("pisell-reservation.grid.time"),
      type: "string"
    },
    {
      key: "partySize",
      label: import_utils.locales.getText("pisell-reservation.grid.party"),
      type: "number"
    },
    {
      key: "cardStatus",
      label: import_utils.locales.getText("pisell-reservation.resource-grid.card-status"),
      type: "string"
    },
    {
      key: "area",
      label: import_utils.locales.getText("pisell-reservation.grid.area"),
      type: "string"
    }
  ];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND,
  RESERVATION_BOUND_TABLE_ELEMENT_KIND,
  applyReservationFloorMapLiveLabels,
  defaultReservationSceneElements,
  defaultReservationTableRows,
  getDefaultReservationFloorMapConfig,
  getReservationDataSourceFormColumns,
  getReservationFloorMapShellConfig,
  mergeFloorMapElementKindCategoriesWithDefaults,
  mergeFloorMapElementKindsWithDefaults,
  reservationDataSourcePlacements,
  reservationPlacementsToSceneElements
});
