import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { ArrowRotateLeft } from '@gravity-ui/icons';
import { Icon } from '@gravity-ui/uikit';
import { block } from "../../../utils/cn.js";
import { Alert } from "../../atoms/Alert/index.js";
import { i18n } from "./i18n/index.js";
const b = block('message-list');
export function ErrorAlert({ onRetry, errorMessage, className }) {
    return (_jsx(Alert, Object.assign({ text: i18n('default-error-text'), variant: "warning", button: onRetry
            ? {
                content: (_jsxs("div", { className: b('retry-button'), children: [_jsx(Icon, { data: ArrowRotateLeft, size: 14 }), i18n('retry-button')] })),
                onClick: onRetry,
            }
            : undefined, className: className }, errorMessage)));
}
//# sourceMappingURL=ErrorAlert.js.map
