import * as Comlink from 'comlink';
import { RefObject } from 'react';
import WebView from 'react-native-webview';
import { WebViewMessageEvent } from 'react-native-webview';

/**
 * An endpoint of communicating with WebView
 */
declare function createWebViewRpcEndpoint(ref: RefObject<WebView>): WebViewEndpoint;
export { createWebViewRpcEndpoint }
export { createWebViewRpcEndpoint as createWebViewRpcEndpoint_alias_1 }

declare const SYMBOL_IGNORING_RPC_RESPONSE_ERROR: symbol;
export { SYMBOL_IGNORING_RPC_RESPONSE_ERROR }
export { SYMBOL_IGNORING_RPC_RESPONSE_ERROR as SYMBOL_IGNORING_RPC_RESPONSE_ERROR_alias_1 }

/**
 * Returns a handler of RPC message from WebView.
 */
declare function useWebViewRpcHandler<Rpcs>(webViewRef: RefObject<WebView>, rpcs: Rpcs): (event: WebViewMessageEvent) => void;
export { useWebViewRpcHandler }
export { useWebViewRpcHandler as useWebViewRpcHandler_alias_1 }

export declare type WebViewEndpoint = Comlink.Endpoint & {
    /**
     * Manually distribute events to listeners as an alternative to `document.addEventHandler` which is unavailable in React Native.
     */
    onMessage: (e: WebViewMessageEvent) => void;
};

declare const webViewRpcEndpoint: Comlink.Endpoint;
export { webViewRpcEndpoint }
export { webViewRpcEndpoint as webViewRpcEndpoint_alias_1 }

declare function wrap<Rpcs>(): Comlink.Remote<Rpcs>;
export { wrap }
export { wrap as wrap_alias_1 }

export { }
