"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorAlert = ErrorAlert;
const jsx_runtime_1 = require("react/jsx-runtime");
const icons_1 = require("@gravity-ui/icons");
const uikit_1 = require("@gravity-ui/uikit");
const cn_1 = require("../../../utils/cn.js");
const Alert_1 = require("../../atoms/Alert/index.js");
const i18n_1 = require("./i18n/index.js");
const b = (0, cn_1.block)('message-list');
function ErrorAlert({ onRetry, errorMessage, className }) {
    return ((0, jsx_runtime_1.jsx)(Alert_1.Alert, Object.assign({ text: (0, i18n_1.i18n)('default-error-text'), variant: "warning", button: onRetry
            ? {
                content: ((0, jsx_runtime_1.jsxs)("div", { className: b('retry-button'), children: [(0, jsx_runtime_1.jsx)(uikit_1.Icon, { data: icons_1.ArrowRotateLeft, size: 14 }), (0, i18n_1.i18n)('retry-button')] })),
                onClick: onRetry,
            }
            : undefined, className: className }, errorMessage)));
}
//# sourceMappingURL=ErrorAlert.js.map
