// (C) 2024 GoodData Corporation
import { insightProperties, insightVisualizationType, } from "@gooddata/sdk-model";
/**
 * @internal
 */
export const isInsightSupportedForAlerts = (insight) => {
    const type = insight ? insightVisualizationType(insight) : null;
    switch (type) {
        case "headline":
        case "bar":
        case "column":
        case "line":
        case "area":
        case "combo2":
        case "scatter":
        case "bubble":
        case "repeater":
        case "bullet":
        case "pie":
        case "donut":
        case "treemap":
        case "funnel":
        case "pyramid":
        case "heatmap":
        case "waterfall":
        case "dependencywheel":
        case "sankey":
        case "pushpin":
        case "table":
            return true;
        default:
            return false;
    }
};
/**
 * @internal
 */
export const isInsightSupportedForScheduledExports = (insight) => {
    const type = insight ? insightVisualizationType(insight) : null;
    return type !== "repeater";
};
/**
 * @internal
 */
export const isInsightAlertingConfigurationEnabled = (insight) => {
    const visualizationProperties = insight ? insightProperties(insight) : {};
    const controls = visualizationProperties?.["controls"] ?? {};
    return !!insight && !controls.disableAlerts;
};
/**
 * @internal
 */
export const isInsightScheduledExportsConfigurationEnabled = (insight) => {
    const visualizationProperties = insight ? insightProperties(insight) : {};
    const controls = visualizationProperties?.["controls"] ?? {};
    return !!insight && !controls.disableScheduledExports;
};
//# sourceMappingURL=alerts.js.map