import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from "react";
import { Box, Text } from "ink";
export function joinBylineItems(items, separator = " | ") {
    return items.map((item) => item.trim()).filter(Boolean).join(separator);
}
export function Byline(props) {
    const children = React.Children.toArray(props.children).filter(Boolean);
    const separator = props.separator ?? " | ";
    return (_jsx(Box, { flexDirection: "row", children: children.map((child, index) => (_jsxs(React.Fragment, { children: [index > 0 && _jsx(Text, { color: "gray", children: separator }), child] }, index))) }));
}
