import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from "react";
import { Text, Box } from "ink";
import { useTheme } from "../theme/theme.js";
import { useTerminalSize } from "../hooks/useTerminalSize.js";
import { BLACK_CIRCLE } from "../constants/figures.js";
import { HOOK_TONE_COLOR } from "../app-items.js";
// Mirror AssistantMessage's layout so the row lines up with normal assistant
// output — same left padding, same prefix width, same content width.
const RESPONSE_LEFT_PADDING = 1;
const RESPONSE_RIGHT_GUARD = 1;
// BLACK_CIRCLE + " " = 2 chars.
const PREFIX_WIDTH = 2;
/**
 * Announces that the automatic ideal-review hook engaged before the final
 * response. Styled like an assistant message (dot prefix, padding, spacing)
 * but in the theme's secondary color so it stands out from normal output.
 */
export const IdealHookMessage = React.memo(function IdealHookMessage({ text, tone = "review", }) {
    const theme = useTheme();
    const { columns } = useTerminalSize();
    const contentWidth = Math.max(10, columns - RESPONSE_LEFT_PADDING - PREFIX_WIDTH - RESPONSE_RIGHT_GUARD);
    const toneColor = theme[HOOK_TONE_COLOR[tone]];
    return (_jsxs(Box, { flexDirection: "row", paddingLeft: RESPONSE_LEFT_PADDING, flexShrink: 1, children: [_jsx(Box, { width: PREFIX_WIDTH, flexShrink: 0, children: _jsx(Text, { color: toneColor, children: BLACK_CIRCLE + " " }) }), _jsx(Box, { width: contentWidth, flexShrink: 1, children: _jsx(Text, { color: toneColor, bold: true, children: text }) })] }));
});
//# sourceMappingURL=IdealHookMessage.js.map