import { AdvancedMarker, AdvancedMarkerAnchorPoint, } from "@vis.gl/react-google-maps" import Body from "@/components/TempDesignSystem/Text/Body" import Caption from "@/components/TempDesignSystem/Text/Caption" import PoiMarker from "../../Markers/Poi" import ScandicMarker from "../../Markers/Scandic" import styles from "./hotelMapContent.module.css" import type { HotelMapContentProps } from "@/types/hotel" export default function HotelMapContent({ coordinates, pointsOfInterest, onActivePoiChange, activePoi, }: HotelMapContentProps) { function toggleActivePoi(poiName: string) { onActivePoiChange?.(activePoi === poiName ? null : poiName) } return ( <> {pointsOfInterest.map((poi) => ( onActivePoiChange?.(poi.name ?? null)} onMouseLeave={() => onActivePoiChange?.(null)} onClick={() => toggleActivePoi(poi.name ?? "")} > {poi.name} {poi.distance} km ))} ) }