'use client'
/**
 * @author: Hemal
 * File: PropertyMapSection.tsx
 * Description: This file contains the PropertyMapSection component, which renders a map view for a property.
 */
import { MapView } from "blankbase-packages";
import React from "react";
import styles from "./PropertyMapSection.module.scss";

const PropertyMapSection: React.FC<any> = ({ data }) => {

  return (
    // Main wrapper of Property Map Section
    <div className={`${styles.propertyMap} mt-4 rounded-xl p-3 h-[288px] w-full mb-6 relative z-0 property-details-map`}>
      {data && <MapView
        properties={[data]}
        width={"100%"}
        height={"100%"}
        onPopupClick={(item: any) => ''}
        //@ts-ignore
        GOOGLE_MAPS_API_KEY={process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY || ''}
      />}
    </div>

  );

};

export default PropertyMapSection;
