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