/* // hooks/useDauzMarkersLayer.js
import { useEffect, useState } from "react";
import L from "leaflet";
import { addContextMenuToMarker } from "../../utils/addContextMenuToMarker";
import { createAndSetDevices } from "../../utils/createAndSetDevices";

const useDauzMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
  const [dauzMarkers, setDauzMarkers] = useState([]);

  useEffect(() => {
    if (GisSystemStatic && GisSystemStatic.length && map) {
      createAndSetDevices(110, setDauzMarkers, GisSystemStatic, priorityConfig); // DAUZ
    }
  }, [GisSystemStatic, map, priorityConfig]);

  useEffect(() => {
    if (map && dauzMarkers.length) {
      dauzMarkers.forEach((marker) => {
        marker.addTo(map);
        oms.addMarker(marker);

        // Popup on mouseover and mouseout
        marker.on("mouseover", function () {
          this.openPopup();
        });
        marker.on("mouseout", function () {
          this.closePopup();
        });

        addContextMenuToMarker(marker);
      });

      // Disable map context menu
      map.options.contextmenu = false;
      map.options.contextmenuItems = [];

      oms.map.options.contextmenu = false;
      oms.map.options.contextmenuItems = [];
    }
  }, [map, dauzMarkers, oms]);

  return dauzMarkers;
};

export default useDauzMarkersLayer;
 */
