import { LoadingCompleteHandler, StageChangeHandler } from '@pie-players/pie-assessment-toolkit/runtime/internal';
export type RuntimeCallbackBridgeChannel = "onStageChange" | "onLoadingComplete";
export interface RuntimeCallbackBridgeOptions {
    /** Layout CE host element the engine dispatches DOM events on. */
    host: HTMLElement;
    /**
     * Late-bound accessor for the resolved `runtime.onStageChange`. The
     * bridge calls this on each `pie-stage-change` event so prop
     * reassigns mid-cohort still reach the latest handler.
     */
    getOnStageChange: () => StageChangeHandler | undefined;
    /**
     * Late-bound accessor for the resolved
     * `runtime.onLoadingComplete`. Called on each
     * `pie-loading-complete` event for the same reason as
     * `getOnStageChange`.
     */
    getOnLoadingComplete: () => LoadingCompleteHandler | undefined;
    /**
     * Optional error sink invoked when a host callback throws. The
     * kernel pipes this into its logger so `runtime.on*` exceptions
     * surface in `pie-debug` without breaking the engine's own
     * dispatch path.
     */
    onError?: (channel: RuntimeCallbackBridgeChannel, error: unknown) => void;
}
/**
 * Attach the lockstep callback bridge. Returns a teardown that removes
 * both DOM listeners; the kernel runs it from its `$effect` cleanup so
 * subsequent host swaps or unmounts release the listeners cleanly.
 */
export declare function attachRuntimeCallbackBridge(options: RuntimeCallbackBridgeOptions): () => void;
