import { jsx as _jsx } from "react/jsx-runtime";
/**
 * TerminalLink — Clickable hyperlink component for Ink.
 *
 * Renders a terminal hyperlink (OSC 8) in supported terminals (iTerm2,
 * VS Code, Hyper, etc.). Falls back to "text (url)" in plain terminals.
 */
import { Text } from 'ink';
import { makeLink } from '../utils/terminal-rendering.js';
import { Colors } from '../styles.js';
export const TerminalLink = ({ url, children, color = Colors.accent, }) => {
    const text = children ?? url;
    return _jsx(Text, { color: color, children: makeLink(text, url) });
};
