import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2023-2025 GoodData Corporation
import { useMemo } from "react";
import { useIntl } from "react-intl";
import { ComparisonPositionValues } from "@gooddata/sdk-ui-charts";
import { comparisonMessages } from "../../../../../locales.js";
import { comparisonPositionDropdownItems } from "../../../../constants/dropdowns.js";
import { getTranslatedDropdownItems } from "../../../../utils/translations.js";
import { DropdownControl } from "../../DropdownControl.js";
import { COMPARISON_POSITION_VALUE_PATH } from "../ComparisonValuePath.js";
export function ComparisonPositionControl({ disabled, showDisabledMessage, properties, pushData, }) {
    const intl = useIntl();
    const position = properties?.controls?.comparison?.position || ComparisonPositionValues.AUTO;
    const items = useMemo(() => getTranslatedDropdownItems(comparisonPositionDropdownItems, intl), [intl]);
    return (_jsx("div", { className: "comparion-postion-control s-comparison-position-control", children: _jsx(DropdownControl, { value: position, valuePath: COMPARISON_POSITION_VALUE_PATH, labelText: comparisonMessages["positionTitle"].id, disabled: disabled, showDisabledMessage: showDisabledMessage, items: items, properties: properties, pushData: pushData }) }));
}
//# sourceMappingURL=ComparisonPositionControl.js.map