export function getMapProviderConfig(provider, key, theme) {
    const mapProvider = {
        name: provider || "maptiler",
        apiKey: key || import.meta.env.VITE_MAPTILER_KEY,
        theme,
    };
    if (typeof provider !== "undefined") {
        if (provider !== "maptiler" && typeof key === "undefined") {
            throw new Error(`Map provider key is required. Please provide a valid key for the ${provider} map provider.`);
        }
        if (provider === "maptiler" &&
            typeof theme === "string" &&
            typeof key === "undefined") {
            mapProvider.theme = undefined; // Use default MapTiler theme if no key is provided
            console.warn("MapTiler theme is set but no API key is provided. Please provide a valid MapTiler API key. Using default LocalLogic MapTiler configuration and theme.");
        }
    }
    return mapProvider;
}
//# sourceMappingURL=getMapProviderConfig.js.map