import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Text } from 'ink';
import { Colors } from '../../colors.js';
import { useKeypress } from '../../hooks/useKeypress.js';
import { RadioButtonSelect } from '../shared/RadioButtonSelect.js';
import { MENU_ACTIONS } from './types.js';
export const SubagentMainMenu = ({ onSelect, onCancel, isFocused = true, }) => {
    useKeypress((key) => {
        if (key.name === 'escape') {
            onCancel?.();
        }
    }, { isActive: isFocused });
    const menuItems = MENU_ACTIONS.map((action) => ({
        label: `${action.label.padEnd(20)} - ${action.description}`,
        value: action.value,
        key: action.value,
    }));
    return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: Colors.Foreground, children: "Select an action:" }) }), _jsx(RadioButtonSelect, { items: menuItems, onSelect: onSelect, isFocused: isFocused, showNumbers: true, maxItemsToShow: 10 }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: Colors.Gray, children: "Press [ESC] to cancel" }) })] }));
};
//# sourceMappingURL=SubagentMainMenu.js.map