///
import { AccountSelf } from "../types/account";
export interface UserWebmap {
id: number;
bezeichner: string;
ars_lnd: string;
backend_url: string;
frontend_url: string;
gebiete: UserWebmapGebiet[];
cluster: UserWebmapCluster[];
gebieteTotalCount: number;
clusterTotalCount: number;
}
export interface UserWebmapGebiet {
id: number;
kategorie: string;
bezeichner: string;
slug: string;
}
export interface UserWebmapCluster {
id: number;
}
export type UserTC = Pick;
/**
* The object passed as AuthenticationContext value.
*/
export interface AuthenticationContextValue {
/** Means account data has been loaded (account and webmap endpoints from the Portal backend) */
isAuthCompleted: boolean;
/** The account data is currently loading (first step of account data loading) */
isLoadingMainAccountData: boolean;
/** The webmap project backends are being queried for project-specific data (regions; second step of account data loading) */
isLoadingAdditionalAccountData: boolean;
/** The login endpoint is being queried */
isLoadingLogin: boolean;
/** On initial load, we immediately start the first step of account data loading */
shouldInitializeUserLoad: boolean;
/** Whether or not the initial auth attempt succeeded. If null, first try has not completed. */
hasInitialUserLoadFailed: boolean | null;
/** Error message when the authentication request via the login endpoint failed */
authFailMessage: string;
/** Main user data from the Portal backend */
user?: AccountSelf;
/** Additional user data from the WebMap backend(s) */
webmaps?: UserWebmap[];
}
export interface AuthenticationContextValueWithSetter extends AuthenticationContextValue {
setAuthenticationContextValue: (value: AuthenticationContextValue | ((value: AuthenticationContextValue) => AuthenticationContextValue)) => void;
}
declare const AuthenticationContext: import("react").Context;
export default AuthenticationContext;