import { jsx as _jsx } from "react/jsx-runtime";
import { Text } from '@gravity-ui/uikit';
import { block } from "../../../utils/cn.js";
import { ToolIndicator } from "../../atoms/ToolIndicator/index.js";
import { i18n } from "./i18n/index.js";
import "./ToolStatus.css";
const b = block('tool-status');
function getIndicatorStatus(status) {
    if (status === 'success' || status === 'error' || status === 'loading') {
        return status;
    }
    return undefined;
}
export function ToolStatus(props) {
    const { status, className, qa } = props;
    const indicatorStatus = getIndicatorStatus(status);
    if (status === 'cancelled') {
        return (_jsx(Text, { color: "secondary", className: b('', className), "data-qa": qa, children: i18n('status-cancelled') }));
    }
    if (indicatorStatus) {
        return _jsx(ToolIndicator, { status: indicatorStatus, className: className, qa: qa });
    }
    return null;
}
//# sourceMappingURL=index.js.map
