/**
 * MK1 Debug Gutter
 *
 * Visual indicator to show safe viewport boundary
 */
import blessed from 'neo-blessed';
/**
 * Create debug gutter stripe(s)
 */
export function createDebugGutter(screen, viewport) {
    const debugGutter = process.env.TUI_DEBUG_GUTTER === '1';
    if (!debugGutter) {
        return null;
    }
    const { safeCols, safeRows, screenCols } = viewport;
    // Show gutter at safe edge
    const gutter = blessed.box({
        left: safeCols - 1,
        top: 0,
        width: 1,
        height: safeRows,
        content: '│'.repeat(safeRows),
        style: {
            fg: 'yellow',
            bg: 'red',
        },
        tags: true,
        scrollable: false,
        alwaysScroll: false,
        wrap: false,
        mouse: false,
        keys: false,
        vi: false,
    });
    // If safe edge differs from screen edge, show both
    if (safeCols < screenCols) {
        // Also show at real screen edge
        const realGutter = blessed.box({
            left: screenCols - 1,
            top: 0,
            width: 1,
            height: safeRows,
            content: '│'.repeat(safeRows),
            style: {
                fg: 'red',
                bg: 'yellow',
            },
            tags: true,
            scrollable: false,
            alwaysScroll: false,
            wrap: false,
            mouse: false,
            keys: false,
            vi: false,
        });
        screen.append(realGutter);
    }
    return gutter;
}
//# sourceMappingURL=debugGutter.js.map