export const MAP_STYLES = {
  light: 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json',
  dark: 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',
  streets: 'https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json',
  satellite: 'https://api.maptiler.com/maps/satellite/style.json',
} as const

export type MapStyleKey = keyof typeof MAP_STYLES

export function getMapStyle(key: MapStyleKey | string): string {
  if (key in MAP_STYLES) {
    return MAP_STYLES[key as MapStyleKey]
  }
  return key
}
