import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { FloorRoomCardFromData } from "./FloorRoomCardFromData.js";
import React, { useEffect, useReducer } from "react";
//#region src/plus/pisellReservation/floorRoomCard/ReservationFloorRoomCard.tsx
/**
* 平面图绑定桌位：RoomCard 视觉（demo 样式）+ 业务行映射数据。
* 内层为 {@link FloorRoomCardFromData}；本组件仅外包根节点并每分钟触发重绘以刷新倒计时/进度。
*/
function ReservationFloorRoomCard(props) {
	const { data, theme = "default", shellShape = "rect", elementLayoutHeightPx, hideHeaderCapacity = false } = props;
	const shapeData = shellShape === "circle" ? { "data-shape": "circle" } : {};
	const [, bumpLayoutTick] = useReducer((x) => x + 1, 0);
	useEffect(() => {
		const id = window.setInterval(() => {
			bumpLayoutTick();
		}, 6e4);
		return () => window.clearInterval(id);
	}, []);
	return /* @__PURE__ */ React.createElement("div", _objectSpread2({
		className: "pisell-res-floor-room-card",
		"data-theme": theme === "default" ? void 0 : theme
	}, shapeData), /* @__PURE__ */ React.createElement(FloorRoomCardFromData, {
		data,
		shellShape,
		elementLayoutHeightPx,
		hideHeaderCapacity
	}));
}
//#endregion
export { ReservationFloorRoomCard };
