"use client";
import { usePannelStore } from "_store/pannelStore";
import { Marker } from "react-leaflet";
import L from "leaflet";

export const MapAdditionals = () => {
	const missionForm = usePannelStore((state) => state.missionFormValues);

	if (!missionForm?.addressLat || !missionForm?.addressLng) return null;

	return (
		<>
			<Marker
				position={[missionForm.addressLat, missionForm.addressLng]}
				icon={L.icon({ iconUrl: "/icons/mapMarker.png", iconSize: [40, 40], iconAnchor: [20, 35] })}
				interactive={false}
			/>
		</>
	);
};
