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/pisellFloorMapLayout/utils/floorMapDataRecordLabel.ts
var floorMapDataRecordLabel_exports = {};
__export(floorMapDataRecordLabel_exports, {
  formatDataRecordOptionLabel: () => formatDataRecordOptionLabel
});
module.exports = __toCommonJS(floorMapDataRecordLabel_exports);
function formatDataRecordOptionLabel(record) {
  const rawMain = record.main_field != null ? String(record.main_field) : "";
  const mainField = rawMain ? (rawMain.split(" ## ")[0] ?? rawMain).trim() : "";
  const code = record.code != null && String(record.code).trim() ? String(record.code).trim() : "";
  const name = record.name != null ? String(record.name).trim() : "";
  const idStr = String(record.id ?? "").trim();
  const primary = mainField || code || name;
  if (primary) return primary;
  return idStr || "—";
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  formatDataRecordOptionLabel
});
