import type { Map as MapLibreMap } from "maplibre-gl";
import { simulationLayerIds } from "./annotation-layers";

export function setSimulationLayersVisibility(map: MapLibreMap, visible: boolean) {
  const visibility = visible ? "visible" : "none";

  simulationLayerIds.forEach((layerId) => {
    if (map.getLayer(layerId)) {
      map.setLayoutProperty(layerId, "visibility", visibility);
    }
  });
}
