// SCENARIO
export var PermissionedAppScenario;
(function (PermissionedAppScenario) {
    PermissionedAppScenario["NotAuthorised"] = "NOT_AUTHORISED";
    PermissionedAppScenario["AuthSucceeded"] = "AUTH_SUCCEEDED";
    PermissionedAppScenario["AuthCancelled"] = "AUTH_CANCELLED";
    PermissionedAppScenario["Continuation"] = "CONTINUATION";
})(PermissionedAppScenario || (PermissionedAppScenario = {}));
export function scenarioAuthSucceeded(permissions, newUser, username, fs) {
    return {
        kind: "permissionedAppState",
        scenario: PermissionedAppScenario.AuthSucceeded,
        permissions,
        authenticated: true,
        throughLobby: true,
        fs,
        newUser,
        username
    };
}
export function scenarioAuthCancelled(permissions, cancellationReason) {
    return {
        kind: "permissionedAppState",
        scenario: PermissionedAppScenario.AuthCancelled,
        permissions,
        authenticated: false,
        throughLobby: true,
        cancellationReason
    };
}
export function scenarioContinuation(permissions, username, fs) {
    return {
        kind: "permissionedAppState",
        scenario: PermissionedAppScenario.Continuation,
        permissions,
        authenticated: true,
        newUser: false,
        throughLobby: false,
        fs,
        username
    };
}
export function scenarioNotAuthorised(permissions) {
    return {
        kind: "permissionedAppState",
        scenario: PermissionedAppScenario.NotAuthorised,
        permissions,
        authenticated: false
    };
}
//# sourceMappingURL=permissionedApp.js.map