const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_mapRowToFloorRoomCardData = require("../floorRoomCard/mapRowToFloorRoomCardData.js");
const require_FloorRoomCardFromData = require("../floorRoomCard/FloorRoomCardFromData.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/plus/pisellReservation/components/ReservationCalendarDayBookingRoomCard.tsx
/**
* 仅用于 {@link PisellReservation} 日历**日视图**时间轴 `renderBooking`；详情弹窗等处直接用 {@link FloorRoomCardFromData}。
* 外层时间槽已由日历算出宽高，此处不再做 scale，与弹窗内一样靠 **100% 铺宽**（极窄槽由 `overflow:hidden` + 卡片内 truncate 处理）。
*/
function ReservationCalendarDayBookingRoomCard(props) {
	const { raw, tableRow } = props;
	const [, bumpLayoutTick] = (0, react.useReducer)((x) => x + 1, 0);
	(0, react.useEffect)(() => {
		const id = window.setInterval(() => bumpLayoutTick(), 6e4);
		return () => window.clearInterval(id);
	}, []);
	const data = (0, react.useMemo)(() => require_mapRowToFloorRoomCardData.buildDetailModalRoomCardData(raw, tableRow), [raw, tableRow]);
	const headerMainFieldOverride = (0, react.useMemo)(() => require_mapRowToFloorRoomCardData.resolveBookingIdForHeader(raw), [raw]);
	return /* @__PURE__ */ react.default.createElement("div", {
		className: "pisell-res-floor-room-card",
		style: {
			width: "100%",
			height: "100%",
			overflow: "hidden",
			boxSizing: "border-box",
			minHeight: 0,
			minWidth: 0,
			display: "flex",
			flexDirection: "column"
		}
	}, /* @__PURE__ */ react.default.createElement("div", { style: {
		flex: 1,
		minWidth: 0,
		minHeight: 0,
		width: "100%",
		display: "flex",
		flexDirection: "column"
	} }, /* @__PURE__ */ react.default.createElement(require_FloorRoomCardFromData.FloorRoomCardFromData, {
		data,
		shellShape: "rect",
		hideHeaderCapacity: true,
		headerMainFieldOverride
	})));
}
//#endregion
exports.ReservationCalendarDayBookingRoomCard = ReservationCalendarDayBookingRoomCard;
