import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { CircleInfoFill, TriangleExclamationFill } from '@gravity-ui/icons';
import { Icon, Text as TextUIKIT } from '@gravity-ui/uikit';
import { formGeneratorCn } from "../../utils/cn.js";
import Base from "../Base/Base.js";
import './Text.css';
const b = formGeneratorCn('text');
const LEVEL_ICON = {
    info: CircleInfoFill,
    danger: TriangleExclamationFill,
};
const Text = ({ text, level, color, when, content, className }) => (_jsx(Base, { when: when, content: content, children: level ? (_jsx("div", { className: b(null, className), children: _jsxs("div", { className: b('note', null, className), children: [_jsx(Icon, { className: b('note-icon'), data: LEVEL_ICON[level], color: level }), _jsx(TextUIKIT, { variant: "body-1", children: text })] }) })) : (_jsx(TextUIKIT, { className: b(null, className), variant: "subheader-1", color: color, children: text })) }));
export default Text;
//# sourceMappingURL=Text.js.map
