import React from 'react';
import '../../assets/styles/room-list.css';
import { Description } from '../parts/description';
import { Characteristic } from '../parts/characteristic';

export const RoomBox = ({ room, onRoomClick }) => {

    const handleBoxClick = () => {
        onRoomClick(room._id);
    };

    return (
        <div className="room-details" onClick={handleBoxClick}>
            <Description title={room?.name}>
                <Characteristic label="Nombre d'articles" value={room?.items_count || "N/A"} />
                <Characteristic label="Prix total" value={room?.room_price || "N/A"} />
            </Description>
        </div>
    );
};