import { Store } from "@tanstack/store"; //#region src/web/stores/accountStore.d.ts /** The signed-in state a host's sign-in bridge reports. Credentials never reach the page. */ export interface PoAccountStatus { signedIn: boolean; email?: string; } /** * Sign in with Po, as the host offers it: Po Desktop's bridge today. The browser does the signing * in; `signIn` opens it and answers the code its page should show. */ export interface PoAccountBridge { status(): Promise; signIn(): Promise<{ code: string; url: string; }>; openSignIn(): Promise; waitForSignIn(): Promise; cancelSignIn(): Promise; signOut(): Promise; } export interface AccountState { /** Undefined where this Po cannot sign in to Po, so no account entry or sign-in step shows. */ bridge?: PoAccountBridge; /** Opens the host's account page, where signing in shows its code and a signed-in person signs out. */ openAccount?: () => void; /** False only while a bound bridge has not answered its first status; with no bridge there is nothing to wait for. */ checked: boolean; status: PoAccountStatus; } export declare const accountStore: Store; /** Reads the bridge's status again, after a sign-in or sign-out somewhere else. */ export declare function refreshAccount(): Promise; /** The host binds its bridge once at startup; the returned function unbinds it. */ export declare function bindAccount(bridge: PoAccountBridge | undefined, openAccount?: () => void): () => void; export declare function signOutAccount(): Promise; //#endregion //# sourceMappingURL=accountStore.d.mts.map