import { Runtime } from '@jolibox/types'; import { BaseSDK } from './sdk'; export declare enum JoliboxRuntimeEvents { /** * Event dispatched when the loading starts */ LOAD_START = "JOLIBOX_RUNTIME_LOAD_START", /** * Event dispatched when the loading is finished */ LOAD_FINISHED = "JOLIBOX_RUNTIME_LOAD_FINISHED", /** * Event dispatched when the loading progress is updated */ LOAD_PROGRESS = "JOLIBOX_RUNTIME_LOAD_PROGRESS", /** * Event dispatched when the game TTI (Time to Interactive) is reported */ GAME_TTI = "JOLIBOX_RUNTIME_GAME_TTI" } /** * @public * Default implementation of JoliboxRuntime, in case the JoliboxRuntime is not available */ export declare class FallbackJoliboxRuntime extends BaseSDK implements Runtime { /** * Notify the end of the loading, will close the loading splash screen */ loadFinished: () => void; /** * Notify the progress of the loading, will update the loading splash screen * @param progress - The progress of the loading, should be an integer between 0 and 100 */ notifyLoadProgress: (progress: number) => void; /** * Report the game TTI (Time to Interactive) * @param duration - The duration in milliseconds from game start to interactive */ gameTTI: () => void; } declare global { interface Window { JoliboxRuntime: typeof FallbackJoliboxRuntime; } } export declare const RuntimeSDK: typeof FallbackJoliboxRuntime;