import { jsx as _jsx } from "react/jsx-runtime";
import { Text } from "ink";
export function shellOutputLineTone(line) {
    if (/error|failed|exception/i.test(line))
        return "error";
    if (/warn|deprecated/i.test(line))
        return "warning";
    if (!line.trim())
        return "muted";
    return "default";
}
export function OutputLine(props) {
    const tone = shellOutputLineTone(props.line);
    const color = tone === "error" ? "red" : tone === "warning" ? "yellow" : tone === "muted" ? "gray" : undefined;
    return _jsx(Text, { color: color, children: props.line || " " });
}
