import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import { Box, Text } from 'ink';
import { theme } from '../semantic-colors.js';
import { ApprovalMode } from '@google/gemini-cli-core';
import { formatCommand } from '../key/keybindingUtils.js';
import { Command } from '../key/keyBindings.js';
export const ApprovalModeIndicator = ({ approvalMode, allowPlanMode, }) => {
    let textColor = '';
    let textContent = '';
    let subText = '';
    const cycleHint = formatCommand(Command.CYCLE_APPROVAL_MODE);
    const yoloHint = formatCommand(Command.TOGGLE_YOLO);
    switch (approvalMode) {
        case ApprovalMode.AUTO_EDIT:
            textColor = theme.status.warning;
            textContent = 'auto-accept edits';
            subText = allowPlanMode
                ? `${cycleHint} to plan`
                : `${cycleHint} to manual`;
            break;
        case ApprovalMode.PLAN:
            textColor = theme.status.success;
            textContent = 'plan';
            subText = `${cycleHint} to manual`;
            break;
        case ApprovalMode.YOLO:
            textColor = theme.status.error;
            textContent = 'YOLO';
            subText = yoloHint;
            break;
        case ApprovalMode.DEFAULT:
        default:
            textColor = theme.text.accent;
            textContent = '';
            subText = `${cycleHint} to accept edits`;
            break;
    }
    return (_jsx(Box, { children: _jsxs(Text, { color: textColor, children: [textContent ? textContent : null, subText ? (_jsxs(Text, { color: theme.text.secondary, children: [textContent ? ' ' : '', subText] })) : null] }) }));
};
//# sourceMappingURL=ApprovalModeIndicator.js.map