import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Card } from '@gravity-ui/uikit';
import { useToolMessage } from "../../../hooks/useToolMessage.js";
import { block } from "../../../utils/cn.js";
import { ToolFooter } from "../../molecules/ToolFooter/index.js";
import { ToolHeader } from "../../molecules/ToolHeader/index.js";
import "./ToolMessage.css";
const b = block('tool-message');
export function ToolMessage(props) {
    const { toolName, className, qa, bodyContent, status, toolIcon, headerContent } = props;
    const { isExpanded, headerActions, footerActions, footerContent, showLoader, isWaiting } = useToolMessage(props);
    return (_jsx(Card, { className: b({ waiting: isWaiting }, className), qa: qa, children: _jsxs("div", { className: b('container'), children: [_jsx(ToolHeader, { toolName: toolName, actions: headerActions, toolIcon: toolIcon, content: headerContent, status: status }), bodyContent && isExpanded && _jsx("div", { className: b('content'), children: bodyContent }), isWaiting && (_jsx(ToolFooter, { actions: footerActions, content: footerContent, showLoader: showLoader }))] }) }));
}
//# sourceMappingURL=index.js.map
