import type { ItemDescriptor } from "../../pageModel";
import type { CapturePageDomResult, CapturePageScreenshotParameters, CapturePageScreenshotResult, CapturePageTargetContext } from "./agentDialogTypes";
export type OffscreenViewport = {
    width: number;
    height: number;
};
/**
 * Resolves the offscreen render viewport from the capture parameters, clamping to a sane range and
 * falling back to the desktop defaults. Pure and unit-testable.
 */
export declare function resolveOffscreenViewport(params?: {
    viewportWidth?: number;
    viewportHeight?: number;
}): OffscreenViewport;
/**
 * Decides whether a capture request should render its target page in a hidden iframe. True only for a
 * background capture whose target page differs from the page this session currently has open (when a
 * helper session already has the target page open, the cheaper live-page capture is used instead).
 */
export declare function shouldRenderTargetOffscreen(params: {
    backgroundCapture?: boolean;
    targetItemId?: string;
    openItemId?: string;
}): boolean;
/**
 * Builds the URL a hidden iframe loads to render the target page in preview mode with the Parhelia
 * editing bridge enabled. Pure aside from `window.location` host alignment, so it is unit-testable.
 */
export declare function buildOffscreenRenderUrl(params: {
    previewUrl: string;
    descriptor: ItemDescriptor;
    site?: string;
    helperSessionId: string;
}): string;
/**
 * Renders the target page in a hidden iframe and returns its DOM. Used for background/taskboard agents
 * that have no attached browser and no page open.
 */
export declare function capturePageDomOffscreen(target: CapturePageTargetContext, helperSessionId: string, viewport: OffscreenViewport): Promise<CapturePageDomResult>;
/**
 * Renders the target page in a hidden iframe and returns a screenshot. Reuses the shared bridge
 * screenshot pipeline (captureScreenshotFromBridgeSource) against the transient offscreen bridge.
 */
export declare function capturePageScreenshotOffscreen(params: CapturePageScreenshotParameters, target: CapturePageTargetContext, helperSessionId: string, viewport: OffscreenViewport): Promise<CapturePageScreenshotResult>;
