import MapLoading from "@/core/components/MapLayer/Loading";
import MarkerLocation from "@/core/components/MapLayer/MarkerLocation";
import { Paper, Stack } from "@mui/material";
import { useFormikContext } from "formik";
import dynamic from "next/dynamic";

const MapLayer = dynamic(() => import("@/core/components/MapLayer"), {
    loading: () => <MapLoading />,
    ssr: false,
});

const LocationOnMap = ({ setValue }) => {
    return (
        <Stack sx={{ height: "100%", position: "relative" }}>
            <Paper sx={{ flexGrow: 1 }} elevation={0}>
                <MapLayer style={{ borderRadius: '4px' }}>
                    <MarkerLocation setValue={setValue} />
                </MapLayer>
            </Paper>
        </Stack>
    )
}
export default LocationOnMap