import type { CoreCommandEnvelope } from "@getuserfeedback/protocol"; import { type LinkRouter } from "@getuserfeedback/protocol/host"; import type { EventHandleInvalidated } from "@getuserfeedback/protocol/internal/core-handle-invalidation"; import type { ConfigureOptions, InitOptions } from "@getuserfeedback/sdk"; import type { ActionRegistry } from "@getuserfeedback/sdk/internal/action-registry"; import type { OpenRequestDispatcher } from "@getuserfeedback/sdk/internal/open-request-dispatcher"; import { type ReactElement } from "react"; import { type CoreWebViewHostProps } from "./core-webview-host.js"; import { type NativeCoreCommandSession } from "./native-core-command-session.js"; import { type NativeDirectCommandSession } from "./native-direct-command-session.js"; import type { NativeDirectCommandSessionController } from "./native-direct-command-session-controller.js"; import { type NativeViewHostProjectionProps, type NativeViewProjection } from "./native-view-host-projection.js"; export type NativeRuntimeRootProps = { coreUrl: string; coreWebViewComponent?: CoreWebViewHostProps["webViewComponent"]; createStartupCommand?: () => NativeRuntimeInitCommand; hostActions?: { getHandler: ActionRegistry["getHandler"]; instanceId: string; }; linkRouter?: { getRouter: () => LinkRouter | undefined; instanceId: string; }; onCommandSessionChange?: (session: NativeCoreCommandSession | null) => void; onError?: (error: Error) => void; onHandleInvalidated?: (message: EventHandleInvalidated) => void; onInvalidMessage?: (error: Error, value: unknown) => void; observeOpenRequest?: (payload: Parameters[0]) => ReturnType; onStartupTerminalError?: (error: Error) => void; startupCommandSettlementTimeoutMs?: number; attachViewProjection?: (projection: NativeViewProjection) => () => void; viewNativeViewComponent?: NativeViewHostProjectionProps["nativeViewComponent"]; viewWebViewComponent?: NativeViewHostProjectionProps["webViewComponent"]; }; type NativeRuntimeInitCommand = Omit & { command: Extract; }; type NativeProviderRuntimeProps = Omit & { /** Stable, exclusive controller retained and disposed by the component that owns this runtime's mounted lifetime. */ directSessionController: NativeDirectCommandSessionController; initOptions: InitOptions; instanceId: string; getRuntimeConfiguration?: () => ConfigureOptions; getHostActionHandler?: ActionRegistry["getHandler"]; getLinkRouter?: () => LinkRouter | undefined; onCommandSessionChange?: (session: NativeDirectCommandSession | null) => void; }; export declare function NativeRuntimeRoot({ attachViewProjection, coreUrl, coreWebViewComponent, createStartupCommand, hostActions, linkRouter, onCommandSessionChange, onError, onHandleInvalidated, onInvalidMessage, observeOpenRequest, onStartupTerminalError, startupCommandSettlementTimeoutMs, viewNativeViewComponent, viewWebViewComponent, }: NativeRuntimeRootProps): ReactElement; export declare function NativeProviderRuntime({ directSessionController, getHostActionHandler, getLinkRouter, getRuntimeConfiguration, initOptions, instanceId, onCommandSessionChange, onError, ...runtimeProps }: NativeProviderRuntimeProps): ReactElement; export {};