import { create } from "zustand";
import { Marker } from "../types/marker";

interface ModalStore {
  hoveredMarker: Marker | null;
  setHoveredMarker: (marker: Marker | null) => void;
}

const useMarker = create<ModalStore>((set) => ({
  hoveredMarker: null,
  setHoveredMarker: (marker) => set(() => ({ hoveredMarker: marker })),
}));

export default useMarker;
