import React, { useEffect, useState } from 'react';
import '../../assets/styles/itembox.css'
import { } from '../item/ItemBox'


// Composant Détails du Produit
export const RoomBox = ({ name, itemCount, roomPrice, _id }) => {
    const [roomData, setRoomData] = useState();

    useEffect(() => {
        setRoomData({name, itemCount, roomPrice, _id})
    }, [name, itemCount, roomPrice, _id]);


    return (
        <div className="product-details" > 
            <Description title={roomData.name} >
                <Characteristic label="Nombre d'articles" value={roomData.itemCount} />
                <Characteristic label="Prix total" value={roomData.roomPrice} />
            </Description>
        </div>
    );
};