import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2019-2025 GoodData Corporation
import { useIntl } from "react-intl";
import { ConfigSubsection } from "./ConfigSubsection.js";
import { DropdownControl } from "./DropdownControl.js";
import { messages } from "../../../locales.js";
import { metricsPositionDropdownItems } from "../../constants/dropdowns.js";
import { getTranslatedDropdownItems } from "../../utils/translations.js";
export function MetricsPositionControl({ pushData, properties, isDisabled, showDisabledMessage = false, defaultValue = "columns", }) {
    const intl = useIntl();
    const metricsPosition = properties?.controls?.["measureGroupDimension"] ?? defaultValue;
    return (_jsx(ConfigSubsection, { title: messages["metricsPositionTitle"].id, children: _jsx(DropdownControl, { value: metricsPosition, valuePath: "measureGroupDimension", labelText: messages["metricsPositionLabel"].id, disabled: isDisabled, properties: properties, pushData: pushData, items: getTranslatedDropdownItems(metricsPositionDropdownItems, intl), showDisabledMessage: showDisabledMessage }) }));
}
//# sourceMappingURL=MetricsPositionControl.js.map