import { isFloorRoomCardTooltipDensity, useFloorRoomCardDensity } from "../floorRoomCardDensity.js";
import { useFloorRoomCardLayoutOptions } from "../floorRoomCardLayoutOptions.js";
import React from "react";
import classNames from "classnames";
//#region src/plus/pisellReservation/floorRoomCard/views/RoomCardShellView.tsx
/**
* 单张 RoomCard 根壳：顶栏 + 可选主体。
* comfortable：方桌顶栏与正文分两截；圆桌在 {@link FloorRoomCardLayoutOptions.discUnifiedLayoutEnabled} 开启时合并为 `.rc-unified`。
* 其它档位：合并为 `.rc-unified`。
*/
function RoomCardShellView(props) {
	const { className, checkoutBookingKey, header, children, ribbonSlot, cornerSlot, shellShape = "rect", tooltipTimeStandaloneMain = false } = props;
	const density = useFloorRoomCardDensity();
	const { discUnifiedLayoutEnabled } = useFloorRoomCardLayoutOptions();
	/** compact 方桌拆顶栏；Tooltip 小卡档（方桌 micro / 圆桌 mini+micro）与合并壳（见 FloorRoomCardFromData） */
	const mergeHeaderBody = shellShape === "circle" && discUnifiedLayoutEnabled || isFloorRoomCardTooltipDensity(density, shellShape);
	const mergedMainClassName = tooltipTimeStandaloneMain ? "rc-tooltip-time-main" : "rc-unified";
	const main = mergeHeaderBody ? /* @__PURE__ */ React.createElement("div", { className: mergedMainClassName }, header != null ? header : null, children) : /* @__PURE__ */ React.createElement(React.Fragment, null, header != null ? header : null, children);
	return /* @__PURE__ */ React.createElement("div", {
		className: classNames(className, "rc-shell"),
		"data-pisell-floor-checkout-booking": checkoutBookingKey
	}, ribbonSlot, cornerSlot, main);
}
//#endregion
export { RoomCardShellView };
