import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2022-2026 GoodData Corporation
import { useBuildAlertingManagementDialogContext } from "../../../automations/connectors/hooks/useBuildAlertingManagementDialogContext.js";
import { useBuildAutomationsContext } from "../../../automations/connectors/hooks/useBuildAutomationsContext.js";
import { AlertingManagementDialogContextProvider } from "../../../automations/contexts/AlertingManagementDialogContext.js";
import { AutomationsContextProvider } from "../../../automations/contexts/AutomationsContext.js";
import { InsightAlertsNew } from "./InsightAlertsNew.js";
export function InsightAlerts({ widget, onClose, onGoBack }) {
    const automationsCtx = useBuildAutomationsContext();
    const managementCtx = useBuildAlertingManagementDialogContext();
    return (_jsx(AutomationsContextProvider, { value: automationsCtx, children: _jsx(AlertingManagementDialogContextProvider, { value: managementCtx, children: _jsx(InsightAlertsNew, { widget: widget, onClose: onClose, onGoBack: onGoBack }) }) }));
}
