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