import { ShareType } from "../share/share-type"; export declare function getReferrer(): string; /** * Detect the best share type, based on the browser's user agent and referrer URL. For example, this * will return 'facebook' if the game was launched from clicking a Facebook post, or is being played * inside the Facebook mobile app. * * You can use this to create a share button that the player is more likely to engage with. */ export declare function getBestShareType(): ShareType; export declare function isWebview(): boolean; interface BeforeInstallPromptEvent extends Event { prompt(): Promise<{ outcome: "accepted" | "dismissed"; }>; } declare global { interface WindowEventMap { beforeinstallprompt: BeforeInstallPromptEvent; } } /** The current installation state of the PWA. */ export declare enum InstallState { /** The PWA hasn't been installed yet, but we can prompt the user to install. */ Installable = "installable", /** The player's browser doesn't support PWA installation, or the PWA is misconfigured. */ Unsupported = "unsupported" } export declare function getInstallState(): InstallState; /** * Requests the player to install the PWA to their home screen. * @returns Whether the installation was accepted by the player. */ export declare function requestInstall(): Promise; export {};