"use client";
import { useEffect, useRef } from "react";

import L from "leaflet";
import "leaflet/dist/leaflet.css";
import ToastCard from "../toast/ToastCard";
import { Toast, ToastBar, Toaster, toast } from "react-hot-toast";
import { useMapStore } from "_store/mapStore";
import { MapContainer } from "react-leaflet";
import { BaseMaps } from "(dispatch)/_components/map/BaseMaps";
import { ContextMenu } from "(dispatch)/_components/map/ContextMenu";

export default () => {
	const { map } = useMapStore();

	return (
		<MapContainer
			className="h-full w-full"
			center={map.center}
			zoom={map.zoom}
			scrollWheelZoom={true}
		>
			<BaseMaps />
			<ContextMenu />
		</MapContainer>
	);
};
