import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
// (C) 2022-2025 GoodData Corporation
import { FormattedMessage } from "react-intl";
import { LoadingSpinner } from "@gooddata/sdk-ui-kit";
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
import { AlertOld } from "./AlertOld.js";
export function AlertsOld({ isLoading, alerts, onDelete, onEdit, onPause, noAlertsMessageId }) {
    const theme = useTheme();
    if (isLoading) {
        return (_jsx("div", { className: "gd-loading-equalizer-wrap gd-notifications-channels-message", children: _jsx("div", { className: "gd-loading-equalizer gd-loading-equalizer-fade", children: _jsx(LoadingSpinner, { className: "large gd-loading-equalizer-spinner", color: theme?.palette?.complementary?.c9 }) }) }));
    }
    if (alerts.length === 0) {
        return (_jsx("div", { className: "gd-notifications-channels-message s-no-alerts-message", children: _jsx(FormattedMessage, { id: noAlertsMessageId, values: { br: _jsx("br", {}) } }) }));
    }
    return (_jsx(_Fragment, { children: alerts.map((alert) => (_jsx(AlertOld, { alert: alert, onDelete: onDelete, onEdit: onEdit, onPause: onPause }, alert.id))) }));
}
//# sourceMappingURL=AlertsListOld.js.map