import{a as e}from"./rolldown-runtime-C_ttsnZz.js";import{St as r,q as t}from"./index-BT8Vuu3B.js";import{t as l}from"./utils-CjIvvA5e-DRv4kcQu.js";import{a,i as o}from"./maplibre-CUYkxr-D-BaX6BEaK.js";var i=e(r(),1),n=t();function s(e,r,t){switch(e){case"fill":return{"fill-color":r,"fill-opacity":.25};case"line":return{"line-color":r,"line-width":"LineString"===t?6:2};default:return{}}}function y({sources:e}){let r=(0,i.useMemo)(()=>Array.isArray(e)&&0!==e.length?e.map(e=>({...e,geoJson:e.geometry?l(e.geometry,e.type):null})):[],[e]);return 0===r?.length?null:(0,n.jsx)(n.Fragment,{children:r?.map(e=>(0,n.jsx)("div",{children:e.geoJson&&(0,n.jsx)(o,{id:e.key,type:"geojson",data:e.geoJson,children:e.layer&&(Array.isArray(e.layer)?e.layer.map((r,t)=>(0,n.jsx)(a,{id:`${e.key}-${t}`,type:r.type,paint:s(r.type,r.color,e.type)},`${e.key}-${t}`)):(0,n.jsx)(a,{id:e.key,type:e.layer.type,paint:s(e.layer.type,e.layer.color,e.type)}))},e.key)},e.key))})}export{y as default};
//# sourceMappingURL=Maptiler-BQliPE7n-6_WdRRdc.js.map