import { WebInputs } from "@replay/web" ; declare const window ; export type AndroidInputs = WebInputs ; /**
 * Send string messages to your Android code and get the response back in a
 * Promise. The id should be unique for any messages sent in parallel.
 */ export function androidBridge < T > ( { id , message = "" , message2 = "" , message3 = "" , message4 = "" , message5 = "" , } ) { return new Promise < T > ( ( res ) => { function setCallback ( ) { return new Promise < T > ( ( res2 ) => { let globalCallbacks = window . __replayGlobalCallbacks__ ; if ( ! globalCallbacks ) { globalCallbacks = { } ; window . __replayGlobalCallbacks__ = globalCallbacks ; } globalCallbacks [ id ] = ( value ) => { res2 ( value ) ; } ; } ) ; } setCallback ( ) . then ( ( value ) => { window . __replayGlobalCallbacks__ ! [ id ] = undefined ; res ( value ) ; } ) ; window . Android . bridge ( id , message , message2 , message3 , message4 , message5 ) ; } ) ; }