"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessageCard = void 0;
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 b = (0, cn_1.editorCn)('message-card');
const DEFAULT_ICONS = {
    success: icons_1.Check,
    error: icons_1.Xmark,
    warning: icons_1.TriangleExclamation,
    info: icons_1.CircleInfo,
};
const MessageCard = ({ title, description, theme, icon }) => {
    const IconComponent = icon || DEFAULT_ICONS[theme];
    return ((0, jsx_runtime_1.jsxs)("div", { className: b({ theme }), children: [(0, jsx_runtime_1.jsx)(uikit_1.Icon, { className: b('icon'), data: IconComponent, size: 20 }), (0, jsx_runtime_1.jsxs)("div", { className: b('content'), children: [(0, jsx_runtime_1.jsx)(uikit_1.Text, { variant: "subheader-1", className: b('title'), children: title }), (0, jsx_runtime_1.jsx)(uikit_1.Text, { variant: "body-1", color: "secondary", className: b('description'), children: description })] })] }));
};
exports.MessageCard = MessageCard;
//# sourceMappingURL=MessageCard.js.map
