"use client"; import { DESKS, getDeskLabel } from "../types"; import type { DeskId, DeskReservation } from "../types"; import { getReservationForDesk } from "../services/reservation-service"; import { cn } from "@/shared/lib/utils"; interface DeskRoomLayoutProps { selectedDate: string; reservations: DeskReservation[]; onDeskClick: (deskId: DeskId) => void; } export function DeskRoomLayout({ selectedDate, reservations, onDeskClick, }: DeskRoomLayoutProps) { return (
{/* Room container — styled like a top-down floor plan */}
{/* Window indicator — LEFT wall (landmark for orientation) */}
{Array.from({ length: 6 }).map((_, i) => (
))}
{/* Window label */}
Fereastră
{/* Door indicator — RIGHT wall */}
Ușă
{/* Central table */}
{/* Top row desks */}
{DESKS.filter((d) => d.position.startsWith("top")).map((desk) => { const reservation = getReservationForDesk( desk.id, selectedDate, reservations, ); return ( onDeskClick(desk.id)} /> ); })}
{/* The table surface */}
{/* Bottom row desks */}
{DESKS.filter((d) => d.position.startsWith("bottom")).map( (desk) => { const reservation = getReservationForDesk( desk.id, selectedDate, reservations, ); return ( onDeskClick(desk.id)} /> ); }, )}
); } interface DeskSlotProps { deskId: DeskId; label: string; reservation: DeskReservation | undefined; side: "top" | "bottom"; onClick: () => void; } function DeskSlot({ label, reservation, side, onClick }: DeskSlotProps) { const isBooked = !!reservation; return ( ); }