import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
/**
 * HeaderBar — minimal header line.
 *
 * "Amplitude Wizard" left, org / project / env right with dot separator.
 */
import { Box, Text } from 'ink';
import { Colors, Icons } from '../styles.js';
import { brandGradient } from '../utils/terminal-rendering.js';
const HEADER_TITLE = brandGradient('Amplitude Wizard');
export const HeaderBar = ({ width, orgName, projectName, envName, }) => {
    const contextParts = [];
    if (orgName)
        contextParts.push(orgName);
    if (projectName)
        contextParts.push(projectName);
    if (envName)
        contextParts.push(envName);
    const context = contextParts.join(' / ');
    return (_jsxs(Box, { width: width, paddingX: 1, children: [_jsx(Box, { flexShrink: 0, children: _jsx(Text, { bold: true, children: HEADER_TITLE }) }), context && (_jsxs(Box, { flexGrow: 1, justifyContent: "flex-end", overflow: "hidden", children: [_jsxs(Text, { color: Colors.subtle, children: [" ", Icons.dot, " "] }), _jsx(Text, { color: Colors.secondary, wrap: "truncate-end", children: context })] }))] }));
};
