import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box } from 'ink';
import { theme } from '../semantic-colors.js';
export const StickyHeader = ({ children, width, isFirst, borderColor, borderDimColor, }) => {
    const separatorWidth = Math.max(0, width - 2);
    return (_jsx(Box, { sticky: true, minHeight: 1, flexShrink: 0, width: width, stickyChildren: _jsxs(Box, { borderStyle: "round", flexDirection: "column", width: width, opaque: true, borderColor: borderColor, borderDimColor: borderDimColor, borderBottom: false, borderTop: isFirst, paddingTop: isFirst ? 0 : 1, children: [_jsx(Box, { paddingX: 1, children: children }), _jsx(Box, { width: separatorWidth, borderColor: theme.ui.dark, borderStyle: "single", borderTop: false, borderBottom: true, borderLeft: false, borderRight: false })] }), children: _jsx(Box, { borderStyle: "round", width: width, borderColor: borderColor, borderDimColor: borderDimColor, borderBottom: false, borderTop: isFirst, borderLeft: true, borderRight: true, paddingX: 1, paddingTop: isFirst ? 0 : 1, paddingBottom: 0, flexDirection: "column", children: children }) }));
};
//# sourceMappingURL=StickyHeader.js.map