import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
/**
 * KeyHintBar — context-sensitive keyboard shortcut display.
 *
 * Each screen declares its available keys; the bar renders them.
 * Always shows / and Tab hints so users discover commands and questions.
 */
import { Box, Text } from 'ink';
import { Colors } from '../styles.js';
const COMMANDS_HINT = { key: '/', label: 'Commands' };
const ASK_HINT = { key: 'Tab', label: 'Ask a question' };
export const KeyHintBar = ({ hints = [], width, showDefaults = true, showAskHint = true, }) => {
    const defaults = showDefaults
        ? showAskHint
            ? [COMMANDS_HINT, ASK_HINT]
            : [COMMANDS_HINT]
        : [];
    const allHints = [...hints, ...defaults];
    return (_jsx(Box, { width: width, paddingX: 1, gap: 2, children: allHints.map((hint, index) => (_jsxs(Box, { children: [_jsx(Text, { color: Colors.muted, children: "[" }), _jsx(Text, { color: Colors.body, bold: true, children: hint.key }), _jsxs(Text, { color: Colors.muted, children: ["] ", hint.label] })] }, `${index}:${hint.key}:${hint.label}`))) }));
};
