import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2025 GoodData Corporation
import { useIntl } from "react-intl";
import { ConfigSubsection } from "./ConfigSubsection.js";
import { DropdownControl } from "./DropdownControl.js";
import { messages } from "../../../locales.js";
import { grandTotalsPositionDropdownItems } from "../../constants/dropdowns.js";
import { getTranslatedDropdownItems } from "../../utils/translations.js";
export function GrandTotalsControl({ pushData, properties, isDisabled, showDisabledMessage = false, }) {
    const intl = useIntl();
    const grandTotalsPosition = properties?.controls?.["grandTotalsPosition"] ?? "pinnedBottom";
    return (_jsx(ConfigSubsection, { title: messages["grandTotalsTitle"].id, children: _jsx(DropdownControl, { value: grandTotalsPosition, valuePath: "grandTotalsPosition", labelText: messages["grandTotalsPositionLabel"].id, disabled: isDisabled, properties: properties, pushData: pushData, items: getTranslatedDropdownItems(grandTotalsPositionDropdownItems, intl), showDisabledMessage: showDisabledMessage }) }));
}
//# sourceMappingURL=GrandTotalsControl.js.map