import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2020-2026 GoodData Corporation
import { useIntl } from "react-intl";
import { DrillFiltersConfigSection } from "./DrillFiltersConfigSection.js";
import { messages } from "./messages.js";
import { useDrillFiltersConfigInner } from "./useDrillFiltersConfigInner.js";
export function DrillFiltersConfigInner({ intersectionAttributesOptions, sourceInsightFiltersOptions, sourceMeasureFiltersOptions, dashboardFiltersOptions, drillIntersectionIgnoredAttributes, includedSourceInsightFiltersObjRefs, ignoredDashboardFilters, includedSourceMeasureFiltersObjRefs, onDrillFiltersChange, }) {
    const intl = useIntl();
    const { intersectionSelection, sourceInsightSelection, sourceMeasureSelection, dashboardSelection, onIgnoredDrillAttributesChange, onIncludedSourceInsightFiltersChange, onSourceMeasureSelectionChange, onDashboardSelectionChange, } = useDrillFiltersConfigInner({
        intersectionAttributesOptions,
        sourceInsightFiltersOptions,
        sourceMeasureFiltersOptions,
        dashboardFiltersOptions,
        drillIntersectionIgnoredAttributes,
        includedSourceInsightFiltersObjRefs,
        ignoredDashboardFilters,
        includedSourceMeasureFiltersObjRefs,
        onDrillFiltersChange,
    });
    return (_jsxs("div", { className: "gd-drill-filters-config-inner", children: [
            _jsx(DrillFiltersConfigSection, { dataTestId: "drill-filters-data-point-section", title: intl.formatMessage(messages.drillFiltersDrilledDataPointSectionTitle), options: intersectionAttributesOptions, selectedIds: intersectionSelection, onSelectionChange: onIgnoredDrillAttributesChange }), _jsx(DrillFiltersConfigSection, { dataTestId: "drill-filters-dashboard-section", title: intl.formatMessage(messages.drillFiltersDashboardSectionTitle), options: dashboardFiltersOptions, selectedIds: dashboardSelection, onSelectionChange: onDashboardSelectionChange }), _jsx(DrillFiltersConfigSection, { dataTestId: "drill-filters-visualization-section", title: intl.formatMessage(messages.drillFiltersVisualizationSectionTitle), options: sourceInsightFiltersOptions, selectedIds: sourceInsightSelection, onSelectionChange: onIncludedSourceInsightFiltersChange }), _jsx(DrillFiltersConfigSection, { dataTestId: "drill-filters-metric-section", title: intl.formatMessage(messages.drillFiltersMetricSectionTitle), options: sourceMeasureFiltersOptions, selectedIds: sourceMeasureSelection, onSelectionChange: onSourceMeasureSelectionChange })
        ] }));
}
