import { MatchmakingClient } from "../matchmaking/client"; import { Disposable, TypedEvent } from "@vramesh/netplayjs-common/typedevent"; import { PeerConnection } from "../matchmaking/peerconnection"; type GameMenuState = { kind: "connecting-to-server"; } | { kind: "registered"; clientID: string; joinURL: string; qrCanvas: HTMLCanvasElement; } | { kind: "connecting-to-host"; } | { kind: "searching-for-matches"; } | { kind: "hosting-public-match"; } | { kind: "game-in-progress"; } | { kind: "connection-closed"; }; export declare class GameMenu { root: HTMLDivElement; state: GameMenuState; matchmaker: MatchmakingClient; gameURL: string; onClientStart: TypedEvent; onHostStart: TypedEvent; connectToHost(hostID: string): void; constructor(); hostListeningHandle?: Disposable; startHostListening(): void; stopHostListening(): void; startMatchmaking(): void; updateState(newState: GameMenuState): void; /** * Try to get a server override from local storage. * Return NULL if we error (for example in incognito mode). */ getLocalStorageServerOverride(): string | null; getJoinURL(room: string): string; centeredText(text: any): import("lit-html").TemplateResult<1>; menuContent(): import("lit-html").TemplateResult<1> | undefined; render(): void; createRootElement(): HTMLDivElement; } export {};