import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { toneColor } from "./design/terminalTheme.js";
export function PromptInputModeIndicator(props) {
    const model = promptInputModeIndicatorModel(props.mode ?? "chat", Boolean(props.busy));
    return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: toneColor(model.tone), dimColor: props.busy, children: model.marker }), _jsx(Text, { children: " " })] }));
}
export function promptInputModeIndicatorModel(mode, busy = false) {
    if (mode === "shell") {
        return { marker: "!", tone: busy ? "warning" : "error", label: "shell" };
    }
    if (mode === "agent") {
        return { marker: "@", tone: busy ? "warning" : "brand", label: "agent" };
    }
    return { marker: ">", tone: busy ? "warning" : "brand", label: "chat" };
}
