import type { Page } from "playwright";
export interface MockRule {
    /** URL pattern to intercept (string, regex pattern, or glob) */
    url: string | RegExp;
    /** HTTP method to match (omit for all methods) */
    method?: string;
    /** If true, abort the request with given error code */
    abort?: boolean | string;
    /** Override status code (e.g. 200, 404, 500) */
    status?: number;
    /** Override response headers */
    headers?: Record<string, string>;
    /** Override response body (JSON string or raw) */
    body?: string | object;
    /** Simulate network delay in ms */
    delay?: number;
}
/**
 * Sets up network interception and mocking on a Playwright page.
 * Returns the active rules count.
 */
export declare function setupNetworkMocks(page: Page, rules: MockRule[]): Promise<number>;
/**
 * Creates common mock patterns for testing.
 */
export declare const MockPresets: {
    /** Mock all API calls to return empty 200 */
    emptyApi: () => MockRule[];
    /** Mock a specific endpoint to return 500 */
    serverError: (path: string) => MockRule[];
    /** Mock a specific endpoint to timeout */
    timeout: (path: string, _delayMs?: number) => MockRule[];
    /** Block third-party trackers */
    blockTrackers: () => MockRule[];
    /** Mock auth token endpoint */
    mockAuth: (token?: string) => MockRule[];
};
//# sourceMappingURL=network-mock.d.ts.map