import FileSystem from "../../fs/index.js";
import { Maybe } from "../../common/types.js";
import { Permissions } from "../../ucan/permissions.js";
export declare enum PermissionedAppScenario {
    NotAuthorised = "NOT_AUTHORISED",
    AuthSucceeded = "AUTH_SUCCEEDED",
    AuthCancelled = "AUTH_CANCELLED",
    Continuation = "CONTINUATION"
}
export declare function scenarioAuthSucceeded(permissions: Maybe<Permissions>, newUser: boolean, username: string, fs: FileSystem | undefined): AuthSucceeded;
export declare function scenarioAuthCancelled(permissions: Maybe<Permissions>, cancellationReason: string): AuthCancelled;
export declare function scenarioContinuation(permissions: Maybe<Permissions>, username: string, fs: FileSystem | undefined): Continuation;
export declare function scenarioNotAuthorised(permissions: Maybe<Permissions>): NotAuthorised;
export declare type PermissionedAppState = NotAuthorised | AuthSucceeded | AuthCancelled | Continuation;
declare type PermissionedAppBase = {
    kind: "permissionedAppState";
};
export declare type NotAuthorised = PermissionedAppBase & {
    scenario: PermissionedAppScenario.NotAuthorised;
    permissions: Maybe<Permissions>;
    authenticated: false;
};
export declare type AuthSucceeded = PermissionedAppBase & {
    scenario: PermissionedAppScenario.AuthSucceeded;
    permissions: Maybe<Permissions>;
    authenticated: true;
    newUser: boolean;
    throughLobby: true;
    username: string;
    fs?: FileSystem;
};
export declare type AuthCancelled = PermissionedAppBase & {
    scenario: PermissionedAppScenario.AuthCancelled;
    permissions: Maybe<Permissions>;
    authenticated: false;
    cancellationReason: string;
    throughLobby: true;
};
export declare type Continuation = PermissionedAppBase & {
    scenario: PermissionedAppScenario.Continuation;
    permissions: Maybe<Permissions>;
    authenticated: true;
    newUser: false;
    throughLobby: false;
    username: string;
    fs?: FileSystem;
};
export {};
