use crate::map::sources::{LayerSource, LayerTypeHint};
use std::convert::Into;
use std::sync::LazyLock;

pub static NOAA_MRMS_MERGED_CREF_QC_CONUS: LazyLock<LayerSource> = LazyLock::new(|| LayerSource {
    source_id: 0xC10FCD0566B7F952,
    tile_url: format!(
        "{}/grib2.noaa_mrms_merged_composite_reflectivity_qc_CONUS/{{z}}/{{x}}/{{y}}.png",
        env!("TILER_BASE_URL")
    ),
    display_name: "Merged Composite Reflectivity QCd".into(),
    short_name: "Composite Reflectivity (M-CONUS-QCd)".into(),
    type_hint: LayerTypeHint::RadarData,
    location: "Continental US".into(),
    source: "NOAA / MRMS".into(),
    source_link: "https://mrms.nssl.noaa.gov".into(),
    tile_size: 256,
    max_zoom: 19,
});
pub static NOAA_MRMS_MERGED_CREF_QC_ALASKA: LazyLock<LayerSource> = LazyLock::new(|| LayerSource {
    source_id: 0x779F656117545E91,
    tile_url: format!(
        "{}/grib2.noaa_mrms_merged_composite_reflectivity_qc_ALASKA/{{z}}/{{x}}/{{y}}.png",
        env!("TILER_BASE_URL")
    ),
    display_name: "Merged Composite Reflectivity QCd".into(),
    short_name: "Composite Reflectivity (M-ALASKA-QCd)".into(),
    type_hint: LayerTypeHint::RadarData,
    location: "Alaska".into(),
    source: "NOAA / MRMS".into(),
    source_link: "https://mrms.nssl.noaa.gov".into(),
    tile_size: 256,
    max_zoom: 19,
});
pub static NOAA_MRMS_MERGED_CREF_QC_CARIB: LazyLock<LayerSource> = LazyLock::new(|| LayerSource {
    source_id: 0xA7076E0145BC4BDD,
    tile_url: format!(
        "{}/grib2.noaa_mrms_merged_composite_reflectivity_qc_CARIB/{{z}}/{{x}}/{{y}}.png",
        env!("TILER_BASE_URL")
    ),
    display_name: "Merged Composite Reflectivity QCd".into(),
    short_name: "Composite Reflectivity (M-CARIB-QCd)".into(),
    type_hint: LayerTypeHint::RadarData,
    location: "Caribbean".into(),
    source: "NOAA / MRMS".into(),
    source_link: "https://mrms.nssl.noaa.gov".into(),
    tile_size: 256,
    max_zoom: 19,
});
pub static NOAA_MRMS_MERGED_CREF_QC_GUAM: LazyLock<LayerSource> = LazyLock::new(|| LayerSource {
    source_id: 0xB277C4B00469BD02,
    tile_url: format!(
        "{}/grib2.noaa_mrms_merged_composite_reflectivity_qc_GUAM/{{z}}/{{x}}/{{y}}.png",
        env!("TILER_BASE_URL")
    ),
    display_name: "Merged Composite Reflectivity QCd".into(),
    short_name: "Composite Reflectivity (M-GUAM-QCd)".into(),
    type_hint: LayerTypeHint::RadarData,
    location: "Guam".into(),
    source: "NOAA / MRMS".into(),
    source_link: "https://mrms.nssl.noaa.gov".into(),
    tile_size: 256,
    max_zoom: 19,
});
pub static NOAA_MRMS_MERGED_CREF_QC_HAWAII: LazyLock<LayerSource> = LazyLock::new(|| LayerSource {
    source_id: 0x238710F2CD275445,
    tile_url: format!(
        "{}/grib2.noaa_mrms_merged_composite_reflectivity_qc_HAWAII/{{z}}/{{x}}/{{y}}.png",
        env!("TILER_BASE_URL")
    ),
    display_name: "Merged Composite Reflectivity QCd".into(),
    short_name: "Composite Reflectivity (M-HAWAII-QCd)".into(),
    type_hint: LayerTypeHint::RadarData,
    location: "Hawaii".into(),
    source: "NOAA / MRMS".into(),
    source_link: "https://mrms.nssl.noaa.gov".into(),
    tile_size: 256,
    max_zoom: 19,
});
pub static NOAA_MRMS_MERGED_RHOHV_3KM_CONUS: LazyLock<LayerSource> =
    LazyLock::new(|| LayerSource {
        source_id: 0x0EFAF68CB6E30B8F,
        tile_url: format!(
            "{}/grib2.noaa_mrms_merged_rhohv_3km_CONUS/{{z}}/{{x}}/{{y}}.png",
            env!("TILER_BASE_URL")
        ),
        display_name: "Merged RhoHV @ 3km".into(),
        short_name: "RhoHV @ 3km (CONUS)".into(),
        type_hint: LayerTypeHint::RadarData,
        location: "Continental US".into(),
        source: "NOAA / MRMS".into(),
        source_link: "https://mrms.nssl.noaa.gov".into(),
        tile_size: 256,
        max_zoom: 19,
    });
