import React from "react"; import useVisibleLayers from "../hooks/useVisibleLayers.js"; import { Stack } from "@styled-icons/bootstrap/Stack/Stack.esm.js"; export function LayerToggle({ layerId, label = "", style, simple, size = "regular", }: { layerId?: string; label?: string; style?: React.CSSProperties; simple?: boolean; size?: "small" | "regular"; }) { const [visibleLayers, toggleLayer] = useVisibleLayers(); if (!layerId) return <>; const on = visibleLayers.includes(layerId); return ( ); }