import { type WidgetLayoutTransitionSchedule } from "@getuserfeedback/protocol/host"; import { type NativeFlowInteraction, type NativeFlowProjection } from "@getuserfeedback/protocol/internal/native-flow-session"; import type { BrowserNavigationAvailabilityPayload } from "@getuserfeedback/protocol/internal/navigation-rpc"; import { type EventViewSize } from "@getuserfeedback/protocol/internal/view-host-control-messages"; import type { OpenRequestDispatcher } from "@getuserfeedback/sdk/internal/open-request-dispatcher"; import type { CoreWebViewHostConnection } from "./core-webview-host-controller.js"; import type { ViewWebViewHostConnection } from "./view-webview-host-controller.js"; type NativeViewSizeReport = Omit & { transitionSchedule?: WidgetLayoutTransitionSchedule; }; export type NativeViewRecord = Readonly<{ nativeFlow?: Readonly<{ projection: NativeFlowProjection; interaction: "idle" | "draft" | "action" | "draft-failed"; pending: boolean; }>; allocationId: number; flowId: string | null; generation: number; isActive: boolean; layoutReportRevision: number; size: NativeViewSizeReport | null; srcdoc: string; viewId: string; }>; export type NativeViewRecordController = { attachNativeContent(input: { allocationId: number; viewId: string; }): NativeContentBinding | null; interactNativeFlow(input: { allocationId: number; viewId: string; projection: NativeFlowProjection; intent: NativeFlowInteraction["intent"]; draft: NativeFlowInteraction["draft"]; }): boolean; closeNativeFlow(input: { allocationId: number; viewId: string; }): void; attachViewConnection(input: { allocationId: number; connection: ViewWebViewHostConnection; }): (() => void) | null; commitViewLayoutTransaction(input: { allocationId: number; layoutReportRevision: number; layoutTransactionId: string; viewId: string; }): void; acknowledgeViewPresentation(input: { allocationId: number; viewId: string; }): void; failViewAllocation(input: { allocationId: number; error: unknown; viewId: string; }): void; dispose(): void; getSnapshot(): readonly NativeViewRecord[]; subscribe(listener: () => void): () => void; }; type NativeContentBinding = { onLayout(size: { width: number; height: number; }): void; dispose(): void; }; type NativeOpenRequestObserver = (payload: Parameters[0]) => ReturnType; export declare function createNativeViewRecordController(input: { coreConnection: CoreWebViewHostConnection; getBrowserNavigationAvailability?: () => BrowserNavigationAvailabilityPayload | undefined; onError: (error: Error) => void; observeOpenRequest?: NativeOpenRequestObserver; }): NativeViewRecordController; export {};