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 { colorSchemeDropdownItems } from "../../constants/dropdowns.js";
import { getTranslatedDropdownItems } from "../../utils/translations.js";
export const ColorSchemeDropdownControl = memo(function ColorSchemeDropdownControl(props) {
    const intl = useIntl();
    const pushData = (data) => {
        if (data.properties?.controls?.["colorScheme"] !== "default") {
            props.pushData?.(data);
            return;
        }
        props.pushData?.({
            ...data,
            properties: {
                ...data.properties,
                controls: {
                    ...data.properties?.controls,
                    colorScheme: undefined,
                },
            },
        });
    };
    return (_jsx(DropdownControl, { ...props, value: props.value ?? "default", items: getTranslatedDropdownItems(colorSchemeDropdownItems, intl), pushData: pushData }));
});
//# sourceMappingURL=ColorSchemeDropdownControl.js.map