// /utils/polylines/eventHandlers.js
export function enablePolylineEvents(polylines, lineColors) {
  if (!polylines || polylines.length === 0) {
    //console.warn("Keine Polylinien vorhanden oder polylines ist undefined.");
    return;
  }

  polylines.forEach((polyline) => {
    polyline.on("mouseover", () => polyline.setStyle({ weight: 14 }));
    polyline.on("mouseout", () => polyline.setStyle({ weight: 3 }));
  });
}

export function disablePolylineEvents(polylines) {
  polylines.forEach((polyline) => {
    polyline.off("mouseover");
    polyline.off("mouseout");
  });
}
