"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
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 Base_1 = tslib_1.__importDefault(require("../Base/Base.js"));
const b = (0, cn_1.formGeneratorCn)('text');
const LEVEL_ICON = {
    info: icons_1.CircleInfoFill,
    danger: icons_1.TriangleExclamationFill,
};
const Text = ({ text, level, color, when, content, className }) => ((0, jsx_runtime_1.jsx)(Base_1.default, { when: when, content: content, children: level ? ((0, jsx_runtime_1.jsx)("div", { className: b(null, className), children: (0, jsx_runtime_1.jsxs)("div", { className: b('note', null, className), children: [(0, jsx_runtime_1.jsx)(uikit_1.Icon, { className: b('note-icon'), data: LEVEL_ICON[level], color: level }), (0, jsx_runtime_1.jsx)(uikit_1.Text, { variant: "body-1", children: text })] }) })) : ((0, jsx_runtime_1.jsx)(uikit_1.Text, { className: b(null, className), variant: "subheader-1", color: color, children: text })) }));
exports.default = Text;
//# sourceMappingURL=Text.js.map
