"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlertFormikError = void 0;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_core_1 = require("@patternfly/react-core");
const AlertFormikError = ({ status, onClose }) => {
    if (!status || !status.error) {
        return null;
    }
    const actionClose = onClose ? react_1.default.createElement(react_core_1.AlertActionCloseButton, { onClose: onClose }) : undefined;
    return (react_1.default.createElement(react_core_1.Alert, { variant: react_core_1.AlertVariant.danger, title: status.error.title, isInline: true, actionClose: actionClose }, status.error.message));
};
exports.AlertFormikError = AlertFormikError;
exports.default = exports.AlertFormikError;
//# sourceMappingURL=AlertFormikError.js.map