/**
 * 平面图 RoomCard 顶栏纯展示：文案与状态类名均由容器传入，不读 locales。
 */
import React from 'react';
import classNames from 'classnames';
export function RoomCardHeaderView(props) {
  var roomTitle = props.roomTitle,
    capacityLine = props.capacityLine,
    status = props.status,
    statusLabel = props.statusLabel,
    _props$showStatusTag = props.showStatusTag,
    showStatusTag = _props$showStatusTag === void 0 ? true : _props$showStatusTag,
    _props$paymentUnpaidF = props.paymentUnpaidFill,
    paymentUnpaidFill = _props$paymentUnpaidF === void 0 ? false : _props$paymentUnpaidF,
    bookingCount = props.bookingCount,
    completeBookingCount = props.completeBookingCount;
  var showCap = capacityLine != null && String(capacityLine).trim() !== '';
  var showCount = typeof bookingCount === 'number' && Number.isFinite(bookingCount) && bookingCount > 0;
  /** 已完成数缺失按 0 渲染：与小卡 / 上层 reservationCards 透传约定一致 */
  var completeCountSafe = typeof completeBookingCount === 'number' && Number.isFinite(completeBookingCount) && completeBookingCount >= 0 ? completeBookingCount : 0;
  return /*#__PURE__*/React.createElement("div", {
    className: classNames('rc-header', paymentUnpaidFill && 'rc-header--payment-unpaid-fill')
  }, /*#__PURE__*/React.createElement("div", {
    className: "rc-header__left"
  }, /*#__PURE__*/React.createElement("span", {
    className: "rc-room-name-line"
  }, /*#__PURE__*/React.createElement("span", {
    className: "rc-room-name"
  }, roomTitle), showCount ? /*#__PURE__*/React.createElement("span", {
    className: "rc-room-name-count"
  }, "(", completeCountSafe, "/", bookingCount, ")") : null), showCap ? /*#__PURE__*/React.createElement("span", {
    className: "rc-capacity"
  }, capacityLine) : null), showStatusTag ? /*#__PURE__*/React.createElement("span", {
    className: classNames('rc-tag', "rc-tag--".concat(status))
  }, statusLabel) : null);
}