import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2026 GoodData Corporation
import { memo } from "react";
import { useIntl } from "react-intl";
import { DropdownControl } from "./DropdownControl.js";
import { getBasemapDropdownItems } from "../../constants/dropdowns.js";
import { getTranslatedDropdownItems } from "../../utils/translations.js";
export const BasemapDropdownControl = memo(function BasemapDropdownControl({ showSatelliteBasemapOption, ...props }) {
    const intl = useIntl();
    const pushData = (data) => {
        if (data.properties?.controls?.["basemap"] !== "default") {
            props.pushData?.(data);
            return;
        }
        props.pushData?.({
            ...data,
            properties: {
                ...data.properties,
                controls: {
                    ...data.properties?.controls,
                    basemap: undefined,
                    colorScheme: undefined,
                    tileset: undefined,
                },
            },
        });
    };
    return (_jsx(DropdownControl, { ...props, value: props.value ?? "default", items: getTranslatedDropdownItems(getBasemapDropdownItems(showSatelliteBasemapOption, props.value ?? "default"), intl), pushData: pushData }));
});
//# sourceMappingURL=BasemapDropdownControl.js.map