/**
 * 将 {@link FloorRoomCardData} 映射为 {@link RoomCardHeaderView} props（供嵌入页直连纯 UI）。
 */

import { formatRoomCapLine, floorRoomCardStatusTagLabel } from "./floorRoomCardHeaderFormat";
export function mapFloorRoomCardDataToHeaderViewProps(data, options) {
  var _options$occupancyBoo;
  var hideCapacity = (options === null || options === void 0 ? void 0 : options.hideCapacity) === true;
  var occ = (_options$occupancyBoo = options === null || options === void 0 ? void 0 : options.occupancyBookings) !== null && _options$occupancyBoo !== void 0 ? _options$occupancyBoo : data.bookings;
  var capLine = hideCapacity ? null : formatRoomCapLine(data, occ);
  return {
    roomTitle: data.main_field,
    capacityLine: capLine,
    status: data.status,
    statusLabel: floorRoomCardStatusTagLabel(data.status),
    showStatusTag: (options === null || options === void 0 ? void 0 : options.showStatusTag) !== false
  };
}