// (C) 2026 GoodData Corporation
import { doesGeoBasemapSupportColorScheme } from "@gooddata/sdk-ui-geo";
function sanitizeLegacyGeoTileset(value) {
    if (value === "satellite") {
        return "satellite";
    }
    return undefined;
}
function sanitizeGeoBasemap(value) {
    if (value === "standard" ||
        value === "monochrome" ||
        value === "satellite" ||
        value === "hybrid" ||
        value === "none") {
        return value;
    }
    return undefined;
}
function sanitizeGeoColorScheme(value) {
    if (value === "light" || value === "dark") {
        return value;
    }
    return undefined;
}
export function sanitizeGeoMapStyleOptions({ basemap, legacyTileset, colorScheme, }) {
    const sanitizedBasemap = sanitizeGeoBasemap(basemap) ?? sanitizeLegacyGeoTileset(legacyTileset);
    const sanitizedColorScheme = sanitizedBasemap !== undefined && doesGeoBasemapSupportColorScheme(sanitizedBasemap)
        ? sanitizeGeoColorScheme(colorScheme)
        : undefined;
    return {
        basemap: sanitizedBasemap,
        colorScheme: sanitizedColorScheme,
    };
}
//# sourceMappingURL=geoMapStyle.js.map