"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_core_1 = require("@patternfly/react-core");
const AlertsContextProvider_1 = require("../AlertsContextProvider");
const Alerts = ({ className }) => {
    const { alerts } = (0, AlertsContextProvider_1.useAlerts)();
    if (alerts.length) {
        return (react_1.default.createElement(react_core_1.AlertGroup, { className: className }, alerts.map((alert) => (
        // eslint-disable-next-line react/jsx-key
        react_1.default.createElement(react_core_1.Alert, Object.assign({ isInline: true }, alert), alert.message)))));
    }
    return null;
};
exports.default = Alerts;
//# sourceMappingURL=Alerts.js.map