// (C) 2023-2026 GoodData Corporation
import { crossFiltering } from "../../../model/commands/drill.js";
import { useDashboardCommandProcessing } from "../../../model/react/useDashboardCommandProcessing.js";
/**
 * @internal
 */
export const useCrossFiltering = ({ onSuccess, onError, onBeforeRun } = {}) => {
    return useDashboardCommandProcessing({
        commandCreator: crossFiltering,
        successEvent: "GDC.DASH/EVT.DRILL.CROSS_FILTERING.RESOLVED",
        errorEvent: "GDC.DASH/EVT.COMMAND.FAILED",
        onSuccess,
        onError,
        onBeforeRun,
    });
};
