import type { JsRequestBuilder, Response, Runtime } from '@devvit/multiplatform/ui-shared-shared.js';
import type { UIEvent } from '@devvit/protos';
import { type Block, type Effect, type LinkedBundle, type Metadata, type UIEnvironment, type UIResponse } from '@devvit/protos';
import type { LiteLoadResponse } from '@devvit/runtime-lite/client/ClientShared.js';
import type { PluginCallback } from '@devvit/runtime-lite/runtime/RuntimeLite.js';
import { type UIProps, type UIState, type WrappedEvent, WrappedRequest, WrappedResponse } from './mappers.js';
import type { UIApp } from './remote-app.js';
export declare const RenderPostContent = "RenderPostContent";
export declare const supportedMethods: Set<"RenderPostContent">;
export type SupportedMethod = Parameters<(typeof supportedMethods)['has']>[0];
export declare class UIRequestBuilder implements JsRequestBuilder<UIState, WrappedEvent> {
    #private;
    constructor(env: UIEnvironment);
    set env(env: UIEnvironment);
    set props(props: UIProps);
    build(state: UIState, events: WrappedEvent[]): WrappedRequest;
}
export declare class ReplayUIResponse implements UIResponse, Response<UIState | undefined, UIEvent> {
    blocks?: Block | undefined;
    effects: Effect[];
    state?: UIState;
    events: UIEvent[];
    constructor(rsp: UIResponse);
    get replay(): UIEvent[];
}
export declare class LocalRuntime implements Runtime<UIState, WrappedEvent, unknown> {
    #private;
    metadata: Readonly<Metadata> | undefined;
    onPluginCall?: PluginCallback | undefined;
    isReady(): boolean;
    set runtimeDebugLogging(on: boolean);
    /** Set the runtime source code. */
    setLocalSrc(src: Blob | undefined): void;
    unload(): void;
    /**
     * Load an app bundle into the local runtime, if available. The bundle is
     * assumed to implement a UIApp.
     */
    load(app: Readonly<LinkedBundle>): Promise<LiteLoadResponse | undefined>;
    handle(method: string, req: WrappedRequest, cb: (rsp: WrappedResponse) => void, err: (err: Error) => void): void;
    /**
     * No-ops for web, but used on native!
     */
    pause(): void;
    reset(): void;
    resume(): void;
    snapshot(): unknown;
}
export declare class RemoteRuntime implements Runtime<UIState, WrappedEvent, unknown> {
    metadata: Readonly<Metadata> | undefined;
    /** A client to the remote runtime. */
    remote?: UIApp | undefined;
    isReady(): boolean;
    load(remote: UIApp | undefined): void;
    handle(method: string, req: WrappedRequest, cb: (p0: WrappedResponse) => void, err: (p0: Error) => void): void;
    /**
     * No-ops for web, but used on native!
     */
    pause(): void;
    reset(): void;
    resume(): void;
    snapshot(): unknown;
}
//# sourceMappingURL=runtimes.d.ts.map