import { Page } from '@playwright/test';
export interface ReportDownloadOptions {
    /** Base URL of the SPA (e.g. https://mentor.ibl.ai) */
    baseUrl: string;
    /** Platform key extracted from or expected in the URL */
    platformKey: string;
    /** Report name extracted from or expected in the URL */
    reportName: string;
    /** Timeout for waiting on phase transitions (default: 60000ms) */
    timeout?: number;
}
/**
 * Build the expected report download page URL.
 * Format: <baseUrl>/reports/<platformKey>/<reportName>
 */
export declare function buildReportUrl(baseUrl: string, platformKey: string, reportName: string): string;
/**
 * Parse platform_key and report_name from the current page URL.
 * Expected format: .../reports/<platform_key>/<report_name>
 */
export declare function parseReportUrlParams(url: string): {
    platformKey: string;
    reportName: string;
} | null;
/**
 * Navigate to the report download page and verify the URL matches the expected format.
 */
export declare function navigateToReportDownload(page: Page, options: ReportDownloadOptions): Promise<void>;
/**
 * Verify the report download page is showing the "Preparing" phase.
 */
export declare function verifyPreparingPhase(page: Page, options?: {
    timeout?: number;
}): Promise<void>;
/**
 * Wait for and verify the report transitions to the "downloading" phase.
 */
export declare function verifyDownloadingPhase(page: Page, options?: {
    timeout?: number;
}): Promise<void>;
/**
 * Wait for and verify the report transitions to the "done" phase.
 */
export declare function verifyDonePhase(page: Page, options?: {
    timeout?: number;
}): Promise<void>;
/**
 * Wait for and verify the report transitions to the "error" phase.
 */
export declare function verifyErrorPhase(page: Page, options?: {
    timeout?: number;
}): Promise<void>;
/**
 * Verify the "Back Home" button is visible and click it.
 */
export declare function clickBackHome(page: Page): Promise<void>;
/**
 * Click the "Download Again" button (only visible in done phase).
 * Skips silently if the button is not visible.
 */
export declare function clickDownloadAgain(page: Page): Promise<boolean>;
/**
 * Click the manual download link (only visible in downloading phase).
 */
export declare function clickManualDownloadLink(page: Page): Promise<void>;
/**
 * Full flow: navigate to report download page and wait for download to complete.
 * Falls back to verifying the error phase if the download does not succeed.
 * Returns the resulting phase: 'done' or 'error'.
 */
export declare function waitForReportDownload(page: Page, options: ReportDownloadOptions): Promise<'done' | 'error'>;
