/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { render } from '@testing-library/react';
import { vi } from 'vitest';
import { useTerminalSize } from '../ui/hooks/useTerminalSize.js';
export function renderAtWidth(component, width) {
    // Mock the useTerminalSize hook to return the specified width
    const mockUseTerminalSize = vi.mocked(useTerminalSize);
    mockUseTerminalSize.mockReturnValue({ columns: width, rows: 20 });
    return render(component);
}
export function testResponsiveBehavior(name, component, assertions) {
    // Test narrow behavior if assertion is provided
    if (assertions.narrow) {
        const narrowResult = renderAtWidth(component, 60);
        assertions.narrow(narrowResult);
        narrowResult.unmount();
    }
    // Test standard behavior if assertion is provided
    if (assertions.standard) {
        const standardResult = renderAtWidth(component, 100);
        assertions.standard(standardResult);
        standardResult.unmount();
    }
    // Test wide behavior if assertion is provided
    if (assertions.wide) {
        const wideResult = renderAtWidth(component, 180);
        assertions.wide(wideResult);
        wideResult.unmount();
    }
}
//# sourceMappingURL=responsive-testing.js.map