import{i as e}from"./chunk-aKtaBQYM.js";import{Ft as t}from"./mui-BgU4WrXF.js";import{T as n}from"./index-bel1r0Sr.js";import{n as r}from"./MapView-Bhqzv-Oc.js";import{t as i}from"./useMapOverlays-DurfHJ2J.js";var a=e(t(),1),o=()=>{let e=(0,a.useId)(),t=i(),o=n(`selectedMapOverlay`),s=t.filter(e=>e.available).find(e=>e.id===o);return(0,a.useEffect)(()=>(s&&(r.addSource(e,s.source),r.addLayer({id:e,type:`raster`,source:e,layout:{visibility:`visible`}})),()=>{r.getLayer(e)&&r.removeLayer(e),r.getSource(e)&&r.removeSource(e)}),[e,s]),null};export{o as t};