import type { EditContextType } from "../../client/editContext";
import type { BridgeGeometrySnapshot, CaptureDomCommandPayload, CaptureDomResultEventPayload, DomUpdatedEventPayload } from "../../bridge/protocol";
import type { AgentDialogRequest, CapturePageScreenshotParameters, CapturePageScreenshotResult, CapturePageScreenshotScope } from "./agentDialogTypes";
/**
 * Minimal slice of the page bridge state needed to render a screenshot. The live editor passes its
 * full PageViewContext (which structurally satisfies this); the background/offscreen capture flow
 * builds one from a transient BridgeClient driving a hidden iframe.
 */
export interface BridgeCaptureSource {
    bridgeReady?: boolean;
    bridgeGeometry?: BridgeGeometrySnapshot;
    bridgeDom?: DomUpdatedEventPayload;
    viewport: {
        width: number;
        height: number;
    };
    editorIframe?: {
        clientWidth: number;
        clientHeight: number;
    } | null;
    requestBridgeCaptureDom?: (payload: CaptureDomCommandPayload) => Promise<CaptureDomResultEventPayload>;
}
/**
 * Renders a screenshot from any bridge source: the live editor page-view context, or a transient
 * BridgeClient driving a hidden iframe (background/offscreen capture). Returns null only when the
 * source has no usable bridge DOM, so callers can fall back.
 */
export declare function captureScreenshotFromBridgeSource(pageViewContext: BridgeCaptureSource | undefined, params: CapturePageScreenshotParameters, selection: string[], normalizedScope: CapturePageScreenshotScope): Promise<CapturePageScreenshotResult | null>;
export declare function capturePageScreenshot(request: AgentDialogRequest, params: CapturePageScreenshotParameters, editContext: EditContextType | undefined): Promise<CapturePageScreenshotResult>;
