import ShareIcon from "./icons/ShareIcon"; import Button from "./ui/Button"; import Project from "../types/Project"; import UnitType from "../types/UnitType"; import PlayIcon from "./icons/PlayIcon"; import VideoModal from "./VideoModal"; import useModalStore from "../stores/useModalStore"; import UnitSliderItem from "./UnitSliderItem"; import NewUnitSlider from "./NewUnitSlider"; import UnitTypeImageWithMarkers from "./UnitTypeImageWithMarkers"; import UnitImageWithSides from "./UnitImageWithSides"; import InteriorSlider from "./InteriorSlider"; interface UnitTypeItemProps { project: Project; type: UnitType; } function UnitTypeItem({ project, type }: UnitTypeItemProps) { function handleShare() { navigator.share({ title: type.name, url: window.location.href, }); } const { setModal } = useModalStore(); return (
{type.slug.includes("-loft") ? ( <> {innerWidth >= 768 ? ( ) : ( )} {innerWidth >= 768 ? ( ) : ( )} ) : ( {innerWidth >= 768 && type.slug !== "2-bedroom-b" ? ( ) : ( )} )} {innerWidth >= 1440 ? ( ) : ( type.interiors.map((interior, index) => ( )) )}

{type.name}

Up to {type.area}

{project.title}

{type.wing && ( <>

{type.wing}

)}

{type.floors}


{type.video && ( )}

{type.desc[0]}

{type.desc[1]}

{type.tourAvailable && ( )} {/* */}
); } export default UnitTypeItem;