import React from "react";
export interface User {
    id: string;
    email: string;
    is_superuser: boolean;
    groups: string[];
    full_name: string;
    username: string;
    permissions: string[];
}
interface UserContext {
    user: User | null | undefined;
    login: (username: string, password: string) => Promise<User | null>;
    logout: () => Promise<void>;
    changePassword: (oldPassword: string, newPassword1: string, newPassword2: string) => Promise<void>;
    /**
     * Horrid name! This is to prevent a flash of loginscreen or ui when getting an already logged in user.
     */
    hasTriedToFetchUser: boolean;
}
declare const UserContext: React.Context<UserContext>;
export declare const useUser: () => UserContext;
export declare const UserContextProvider: React.FC<React.PropsWithChildren>;
export default UserContext;
