import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from "react";
import { Box, Text } from "ink";
import { toneColor } from "./design/terminalTheme.js";
const MessageResponseContext = React.createContext(false);
export function MessageResponse(props) {
    const insideResponse = React.useContext(MessageResponseContext);
    if (insideResponse)
        return _jsx(_Fragment, { children: props.children });
    return (_jsx(MessageResponseContext.Provider, { value: true, children: _jsxs(Box, { flexDirection: "row", height: props.height, children: [_jsx(Text, { color: toneColor(props.tone) ?? "gray", children: "| " }), _jsx(Box, { flexDirection: "column", flexGrow: 1, children: props.children })] }) }));
}
