import useWingSidebar from "../../store/useWingSidebar"; import { IDesctiptionFloor } from "../../types/descriptionFloor"; import IUnit from "../../types/IUnit"; interface FloorDescriptionProps { descriptionFloor: IDesctiptionFloor | null; floorApartments: IUnit[]; isLeft: boolean; } const FloorDescription = ({ descriptionFloor, floorApartments, isLeft }: FloorDescriptionProps) => { const { isSidebar } = useWingSidebar(); return ( <>

{descriptionFloor?.floor} Floor

{descriptionFloor?.wing}

{floorApartments.length > 0 && (
{floorApartments.length} units
)}
{floorApartments.filter((apart) => apart.unitType === "Studio Flex").length > 0 && (

{floorApartments.filter((apart) => apart.unitType === "Studio Flex").length}

Studio Flex

{/* Unavailable */}

)} {floorApartments.filter((apart) => apart.unitType === "Studio Squared").length > 0 && (

{floorApartments.filter((apart) => apart.unitType === "Studio Squared").length}

Studio²

{/* Unavailable */}

)} {floorApartments.filter((apart) => apart.unitType === "1 BR Squared").length > 0 && (

{floorApartments.filter((apart) => apart.unitType === "1 BR Squared").length}

1 Bedroom²

{/* Unavailable */}

)} {floorApartments.filter((apart) => apart.unitType === "2 BR Squared").length > 0 && (

{floorApartments.filter((apart) => apart.unitType === "2 BR Squared").length}

2 Bedroom²

{/* Unavailable */}

)}
); }; export default FloorDescription;