// (C) 2021-2026 GoodData Corporation
import { eventGuard } from "./util.js";
/**
 * @alpha
 */
export function drillRequested(ctx, drillEvent, drillContext, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.REQUESTED",
        ctx,
        correlationId,
        payload: {
            drillEvent,
            drillContext,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillRequested}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillRequested = eventGuard("GDC.DASH/EVT.DRILL.REQUESTED");
/**
 * @alpha
 */
export function drillResolved(ctx, drillEvent, drillContext, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.RESOLVED",
        ctx,
        correlationId,
        payload: {
            drillEvent,
            drillContext,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillResolved}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillResolved = eventGuard("GDC.DASH/EVT.DRILL.RESOLVED");
/**
 * @alpha
 */
export function drillDownRequested(ctx, insight, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_DOWN.REQUESTED",
        ctx,
        correlationId,
        payload: {
            insight,
            drillEvent,
            drillDefinition,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillDownRequested}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillDownRequested = eventGuard("GDC.DASH/EVT.DRILL.DRILL_DOWN.REQUESTED");
/**
 * @alpha
 */
export function drillDownResolved(ctx, insight, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_DOWN.RESOLVED",
        ctx,
        correlationId,
        payload: {
            insight,
            drillEvent,
            drillDefinition,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillDownResolved}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillDownResolved = eventGuard("GDC.DASH/EVT.DRILL.DRILL_DOWN.RESOLVED");
/**
 * @alpha
 */
export function drillToInsightRequested(ctx, insight, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_INSIGHT.REQUESTED",
        ctx,
        correlationId,
        payload: {
            insight,
            drillEvent,
            drillDefinition,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToInsightRequested}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToInsightRequested = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_INSIGHT.REQUESTED");
/**
 * @alpha
 */
export function drillToInsightResolved(ctx, insight, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_INSIGHT.RESOLVED",
        ctx,
        correlationId,
        payload: {
            insight,
            drillEvent,
            drillDefinition,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToInsightResolved}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToInsightResolved = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_INSIGHT.RESOLVED");
/**
 * @alpha
 */
export function drillToDashboardRequested(ctx, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_DASHBOARD.REQUESTED",
        ctx,
        correlationId,
        payload: {
            drillDefinition,
            drillEvent,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToDashboardRequested}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToDashboardRequested = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_DASHBOARD.REQUESTED");
/**
 * @alpha
 */
export function drillToDashboardResolved(ctx, filters, attributeFilterConfigs, parameters, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_DASHBOARD.RESOLVED",
        ctx,
        correlationId,
        payload: {
            filters,
            attributeFilterConfigs,
            parameters,
            drillDefinition,
            drillEvent,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToDashboardResolved}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToDashboardResolved = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_DASHBOARD.RESOLVED");
/**
 * @alpha
 */
export function drillToCustomUrlRequested(ctx, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_CUSTOM_URL.REQUESTED",
        ctx,
        correlationId,
        payload: {
            drillEvent,
            drillDefinition,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToCustomUrlRequested}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToCustomUrlRequested = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_CUSTOM_URL.REQUESTED");
/**
 * @alpha
 */
export function drillToCustomUrlResolved(ctx, url, drillDefinition, drillEvent, filtersInfo, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_CUSTOM_URL.RESOLVED",
        ctx,
        correlationId,
        payload: {
            url,
            drillEvent,
            drillDefinition,
            filtersInfo,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToCustomUrlResolved}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToCustomUrlResolved = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_CUSTOM_URL.RESOLVED");
/**
 * @alpha
 */
export function drillToAttributeUrlRequested(ctx, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_ATTRIBUTE_URL.REQUESTED",
        ctx,
        correlationId,
        payload: {
            drillEvent,
            drillDefinition,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToAttributeUrlRequested}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToAttributeUrlRequested = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_ATTRIBUTE_URL.REQUESTED");
/**
 * @alpha
 */
export function drillToAttributeUrlResolved(ctx, url, drillDefinition, drillEvent, filtersInfo, isImplicit, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_ATTRIBUTE_URL.RESOLVED",
        ctx,
        correlationId,
        payload: {
            drillEvent,
            drillDefinition,
            url,
            filtersInfo,
            isImplicit,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToAttributeUrlResolved}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToAttributeUrlResolved = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_ATTRIBUTE_URL.RESOLVED");
/**
 * @alpha
 */
export function drillToLegacyDashboardRequested(ctx, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_LEGACY_DASHBOARD.REQUESTED",
        ctx,
        correlationId,
        payload: {
            drillEvent,
            drillDefinition,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToLegacyDashboardRequested}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToLegacyDashboardRequested = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_LEGACY_DASHBOARD.REQUESTED");
/**
 * @alpha
 */
export function drillToLegacyDashboardResolved(ctx, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILL_TO_LEGACY_DASHBOARD.RESOLVED",
        ctx,
        correlationId,
        payload: {
            drillEvent,
            drillDefinition,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillToLegacyDashboardResolved}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillToLegacyDashboardResolved = eventGuard("GDC.DASH/EVT.DRILL.DRILL_TO_LEGACY_DASHBOARD.RESOLVED");
/**
 * @alpha
 */
export function drillableItemsChanged(ctx, drillableItems, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.DRILLABLE_ITEMS.CHANGED",
        ctx,
        correlationId,
        payload: {
            drillableItems,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDrillableItemsChanged}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardDrillableItemsChanged = eventGuard("GDC.DASH/EVT.DRILL.DRILLABLE_ITEMS.CHANGED");
/**
 * @beta
 */
export function crossFilteringRequested(ctx, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.CROSS_FILTERING.REQUESTED",
        ctx,
        correlationId,
        payload: {
            drillDefinition,
            drillEvent,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardCrossFilteringRequested}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardCrossFilteringRequested = eventGuard("GDC.DASH/EVT.DRILL.CROSS_FILTERING.REQUESTED");
/**
 * @beta
 */
export function crossFilteringResolved(ctx, filters, drillDefinition, drillEvent, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.CROSS_FILTERING.RESOLVED",
        ctx,
        correlationId,
        payload: {
            filters,
            drillDefinition,
            drillEvent,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardCrossFilteringResolved}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardCrossFilteringResolved = eventGuard("GDC.DASH/EVT.DRILL.CROSS_FILTERING.RESOLVED");
/**
 * @beta
 */
export function keyDriverAnalysisRequested(ctx, drillDefinition, drillEvent, keyDriveItem, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.KEY_DRIVER_ANALYSIS.REQUESTED",
        ctx,
        correlationId,
        payload: {
            drillDefinition,
            drillEvent,
            keyDriveItem,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardKeyDriverAnalysisRequested}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardKeyDriverAnalysisRequested = eventGuard("GDC.DASH/EVT.DRILL.KEY_DRIVER_ANALYSIS.REQUESTED");
/**
 * @beta
 */
export function keyDriverAnalysisResolved(ctx, drillDefinition, drillEvent, keyDriveDefinition, correlationId) {
    return {
        type: "GDC.DASH/EVT.DRILL.KEY_DRIVER_ANALYSIS.RESOLVED",
        ctx,
        correlationId,
        payload: {
            drillDefinition,
            drillEvent,
            keyDriveDefinition,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardKeyDriverAnalysisResolved}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardKeyDriverAnalysisResolved = eventGuard("GDC.DASH/EVT.DRILL.KEY_DRIVER_ANALYSIS.RESOLVED");
