// (C) 2021-2026 GoodData Corporation
import { eventGuard } from "./util.js";
export function dashboardInitialized(ctx, dashboard, insights, config, permissions, correlationId) {
    return {
        type: "GDC.DASH/EVT.INITIALIZED",
        ctx,
        correlationId,
        payload: {
            dashboard,
            insights,
            config,
            permissions,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link DashboardInitialized}.
 *
 * @param obj - object to test
 * @public
 */
export const isDashboardInitialized = eventGuard("GDC.DASH/EVT.INITIALIZED");
export function dashboardDeinitialized(ctx, dashboard, correlationId) {
    return {
        type: "GDC.DASH/EVT.DEINITIALIZED",
        ctx,
        correlationId,
        payload: {
            dashboard,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link DashboardDeinitialized}.
 *
 * @param obj - object to test
 * @public
 */
export const isDashboardDeinitialized = eventGuard("GDC.DASH/EVT.DEINITIALIZED");
export function dashboardSaved(ctx, dashboard, newDashboard, correlationId) {
    return {
        type: "GDC.DASH/EVT.SAVED",
        ctx,
        correlationId,
        payload: {
            dashboard,
            newDashboard,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link DashboardSaved}.
 *
 * @param obj - object to test
 * @public
 */
export const isDashboardSaved = eventGuard("GDC.DASH/EVT.SAVED");
export function dashboardCopySaved(ctx, dashboard, isOriginalDashboardLocked, correlationId) {
    return {
        type: "GDC.DASH/EVT.COPY_SAVED",
        ctx,
        correlationId,
        payload: {
            dashboard,
            isOriginalDashboardLocked,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link DashboardCopySaved}.
 *
 * @param obj - object to test
 * @public
 */
export const isDashboardCopySaved = eventGuard("GDC.DASH/EVT.COPY_SAVED");
export function dashboardRenamed(ctx, newTitle, correlationId) {
    return {
        type: "GDC.DASH/EVT.RENAMED",
        ctx,
        correlationId,
        payload: {
            newTitle,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardRenamed}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardRenamed = eventGuard("GDC.DASH/EVT.RENAMED");
export function dashboardWasReset(ctx, dashboard, correlationId) {
    return {
        type: "GDC.DASH/EVT.RESET",
        ctx,
        correlationId,
        payload: {
            dashboard,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardWasReset}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardWasReset = eventGuard("GDC.DASH/EVT.RESET");
export function dashboardDeleted(ctx, dashboard, correlationId) {
    return {
        type: "GDC.DASH/EVT.DELETED",
        ctx,
        correlationId,
        payload: {
            dashboard,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardDeleted}
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardDeleted = eventGuard("GDC.DASH/EVT.DELETED");
export function dateFilterValidationFailed(ctx, result, correlationId) {
    return {
        type: "GDC.DASH/EVT.FILTER_CONTEXT.DATE_FILTER.VALIDATION.FAILED",
        ctx,
        correlationId,
        payload: {
            result,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link DateFilterValidationFailed}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDateFilterValidationFailed = eventGuard("GDC.DASH/EVT.FILTER_CONTEXT.DATE_FILTER.VALIDATION.FAILED");
export function dashboardExportToPdfRequested(ctx, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.PDF.REQUESTED",
        ctx,
        correlationId,
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToPdfRequested}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToPdfRequested = eventGuard("GDC.DASH/EVT.EXPORT.PDF.REQUESTED");
export function dashboardExportToPdfResolved(ctx, result, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.PDF.RESOLVED",
        ctx,
        correlationId,
        payload: {
            resultUri: result.uri,
            result,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToPdfResolved}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToPdfResolved = eventGuard("GDC.DASH/EVT.EXPORT.PDF.RESOLVED");
export function dashboardExportToExcelRequested(ctx, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.EXCEL.REQUESTED",
        ctx,
        correlationId,
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToExcelRequested}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToExcelRequested = eventGuard("GDC.DASH/EVT.EXPORT.EXCEL.REQUESTED");
export function dashboardExportToExcelResolved(ctx, result, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.EXCEL.RESOLVED",
        ctx,
        correlationId,
        payload: {
            resultUri: result.uri,
            result,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToExcelResolved}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToExcelResolved = eventGuard("GDC.DASH/EVT.EXPORT.EXCEL.RESOLVED");
export function dashboardExportToPdfPresentationRequested(ctx, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.PDF_PRESENTATION.REQUESTED",
        ctx,
        correlationId,
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToPdfPresentationRequested}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToPdfPresentationRequested = eventGuard("GDC.DASH/EVT.EXPORT.PDF_PRESENTATION.REQUESTED");
export function dashboardExportToPdfPresentationResolved(ctx, result, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.PDF_PRESENTATION.RESOLVED",
        ctx,
        correlationId,
        payload: {
            resultUri: result.uri,
            result,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToPdfPresentationResolved}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToPdfPresentationResolved = eventGuard("GDC.DASH/EVT.EXPORT.PDF_PRESENTATION.RESOLVED");
export function dashboardExportToPptPresentationRequested(ctx, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.PPT_PRESENTATION.REQUESTED",
        ctx,
        correlationId,
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToPptPresentationRequested}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToPptPresentationRequested = eventGuard("GDC.DASH/EVT.EXPORT.PPT_PRESENTATION.REQUESTED");
export function dashboardExportToPptPresentationResolved(ctx, result, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.PPT_PRESENTATION.RESOLVED",
        ctx,
        correlationId,
        payload: {
            resultUri: result.uri,
            result,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToPptPresentationResolved}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToPptPresentationResolved = eventGuard("GDC.DASH/EVT.EXPORT.PPT_PRESENTATION.RESOLVED");
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToPptPresentationResolved}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToImageResolved = eventGuard("GDC.DASH/EVT.EXPORT.IMAGE.RESOLVED");
/**
 * Tests whether the provided object is an instance of {@link IDashboardExportToPptPresentationRequested}.
 *
 * @param obj - object to test
 * @beta
 */
export const isDashboardExportToImageRequested = eventGuard("GDC.DASH/EVT.EXPORT.IMAGE.REQUESTED");
export function dashboardExportToImageRequested(ctx, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.IMAGE.REQUESTED",
        ctx,
        correlationId,
    };
}
export function dashboardExportToImageResolved(ctx, result, correlationId) {
    return {
        type: "GDC.DASH/EVT.EXPORT.IMAGE.RESOLVED",
        ctx,
        correlationId,
        payload: {
            resultUri: result.uri,
            result,
        },
    };
}
export function dashboardSharingChanged(ctx, newSharingProperties, correlationId) {
    return {
        type: "GDC.DASH/EVT.SHARING.CHANGED",
        ctx,
        correlationId,
        payload: {
            newSharingProperties,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link DashboardSharingChanged}.
 *
 * @param obj - object to test
 * @public
 */
export const isDashboardSharingChanged = eventGuard("GDC.DASH/EVT.SHARING.CHANGED");
export function dashboardIgnoreExecutionTimestampChanged(ctx, ignoreExecutionTimestamp, correlationId) {
    return {
        type: "GDC.DASH/EVT.IGNORE_EXECUTION_TIMESTAMP_CHANGED",
        ctx,
        correlationId,
        payload: {
            ignoreExecutionTimestamp,
        },
    };
}
/**
 * Tests whether the provided object is an instance of {@link IDashboardIgnoreExecutionTimestampChanged}.
 *
 * @param obj - object to test
 * @alpha
 */
export const isDashboardIgnoreExecutionTimestampChanged = eventGuard("GDC.DASH/EVT.IGNORE_EXECUTION_TIMESTAMP_CHANGED");
//# sourceMappingURL=dashboard.js.map