import{i as e}from"./chunk-aKtaBQYM.js";import{Vt as t,zt as n}from"./mui-B6lh3XSP.js";import{R as r,yt as i}from"./index-KVuxnkWj.js";var a=e(t(),1),o=(e,t)=>{let n={type:`raster`,tiles:e,tileSize:256,maxzoom:t};return Object.keys(n).forEach(e=>n[e]===void 0&&delete n[e]),n},s=(e,t)=>o([`https://tile.openweathermap.org/map/${e}/{z}/{x}/{y}.png?appid=${t}`],18),c=()=>{let e=i(),t=r(`googleKey`),c=r(`openWeatherKey`),l=r(`tomTomKey`),u=r(`hereKey`),d=n(e=>e.session.server.overlayUrl);return(0,a.useMemo)(()=>[{id:`googleTraffic`,title:e(`mapGoogleTraffic`),source:o([`google://satellite/{z}/{x}/{y}?key=${t}&layerType=layerTraffic&overlay=true`],20),available:!!t,attribute:`googleKey`},{id:`openSeaMap`,title:e(`mapOpenSeaMap`),source:o([`https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png`],18),available:!0},{id:`openRailwayMap`,title:e(`mapOpenRailwayMap`),source:o([`https://tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png`],19),available:!0},{id:`openWeatherClouds`,title:e(`mapOpenWeatherClouds`),source:s(`clouds_new`,c),available:!!c,attribute:`openWeatherKey`},{id:`openWeatherPrecipitation`,title:e(`mapOpenWeatherPrecipitation`),source:s(`precipitation_new`,c),available:!!c,attribute:`openWeatherKey`},{id:`openWeatherPressure`,title:e(`mapOpenWeatherPressure`),source:s(`pressure_new`,c),available:!!c,attribute:`openWeatherKey`},{id:`openWeatherWind`,title:e(`mapOpenWeatherWind`),source:s(`wind_new`,c),available:!!c,attribute:`openWeatherKey`},{id:`openWeatherTemperature`,title:e(`mapOpenWeatherTemperature`),source:s(`temp_new`,c),available:!!c,attribute:`openWeatherKey`},{id:`tomTomFlow`,title:e(`mapTomTomFlow`),source:o([`https://api.tomtom.com/traffic/map/4/tile/flow/absolute/{z}/{x}/{y}.png?key=${l}`],22),available:!!l,attribute:`tomTomKey`},{id:`tomTomIncidents`,title:e(`mapTomTomIncidents`),source:o([`https://api.tomtom.com/traffic/map/4/tile/incidents/s3/{z}/{x}/{y}.png?key=${l}`],22),available:!!l,attribute:`tomTomKey`},{id:`hereFlow`,title:e(`mapHereFlow`),source:o([1,2,3,4].map(e=>`https://${e}.traffic.maps.ls.hereapi.com/maptile/2.1/flowtile/newest/normal.day/{z}/{x}/{y}/256/png8?apiKey=${u}`),20),available:!!u,attribute:`hereKey`},{id:`custom`,title:e(`mapOverlayCustom`),source:o([d]),available:!!d}],[e,t,c,l,u,d])};export{c as t};