import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2026 GoodData Corporation
import { useCallback } from "react";
import { DashboardAttributeFilterConfigModeValues, } from "@gooddata/sdk-model";
import { ConfigurationCategory } from "../attributeFilter/dashboardDropdownBody/configuration/ConfigurationCategory.js";
import { ConfigurationPanelHeader } from "../attributeFilter/dashboardDropdownBody/configuration/ConfigurationPanelHeader.js";
import { ConfigModeSelect } from "../configuration/ConfigurationModeSelect.js";
import { AttributeTitleRenaming } from "../configuration/title/AttributeTitleRenaming.js";
/**
 * @internal
 */
export function MeasureValueFilterConfiguration({ intl, titleText, resetTitleText, modeCategoryTitleText, title, defaultTitle, mode, showConfigModeSection, onTitleChange, onTitleReset, onModeChange, }) {
    const handleModeChanged = useCallback((value) => {
        onModeChange(value);
    }, [onModeChange]);
    return (_jsxs("div", { className: "s-measure-value-filter-dropdown-configuration attribute-filter-dropdown-configuration sdk-edit-mode-on", children: [
            _jsx(ConfigurationPanelHeader, {}), _jsx(AttributeTitleRenaming, { categoryTitle: titleText, resetTitleText: resetTitleText, onClick: onTitleReset, onChange: onTitleChange, showResetTitle: title !== defaultTitle, attributeTitle: title }), showConfigModeSection ? (_jsxs(_Fragment, { children: [
                    _jsx(ConfigurationCategory, { categoryTitle: modeCategoryTitleText }), _jsx(ConfigModeSelect, { intl: intl, selectedMode: mode ?? DashboardAttributeFilterConfigModeValues.ACTIVE, onChanged: handleModeChanged })
                ] })) : null] }));
}
//# sourceMappingURL=MeasureValueFilterConfiguration.js.map