const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
let react = require("react");
react = require_runtime.__toESM(react);
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
//#region src/plus/pisellReservation/floorRoomCard/views/RoomCardHeaderView.tsx
/**
* 平面图 RoomCard 顶栏纯展示：文案与状态类名均由容器传入，不读 locales。
*/
function RoomCardHeaderView(props) {
	const { roomTitle, capacityLine, status, statusLabel, showStatusTag = true, paymentUnpaidFill = false, bookingCount, completeBookingCount } = props;
	const showCap = capacityLine != null && String(capacityLine).trim() !== "";
	const showCount = typeof bookingCount === "number" && Number.isFinite(bookingCount) && bookingCount > 0;
	/** 已完成数缺失按 0 渲染：与小卡 / 上层 reservationCards 透传约定一致 */
	const completeCountSafe = typeof completeBookingCount === "number" && Number.isFinite(completeBookingCount) && completeBookingCount >= 0 ? completeBookingCount : 0;
	return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("rc-header", paymentUnpaidFill && "rc-header--payment-unpaid-fill") }, /* @__PURE__ */ react.default.createElement("div", { className: "rc-header__left" }, /* @__PURE__ */ react.default.createElement("span", { className: "rc-room-name-line" }, /* @__PURE__ */ react.default.createElement("span", { className: "rc-room-name" }, roomTitle), showCount ? /* @__PURE__ */ react.default.createElement("span", { className: "rc-room-name-count" }, "(", completeCountSafe, "/", bookingCount, ")") : null), showCap ? /* @__PURE__ */ react.default.createElement("span", { className: "rc-capacity" }, capacityLine) : null), showStatusTag ? /* @__PURE__ */ react.default.createElement("span", { className: (0, classnames.default)("rc-tag", `rc-tag--${status}`) }, statusLabel) : null);
}
//#endregion
exports.RoomCardHeaderView = RoomCardHeaderView;
