import { BehaviorSubject } from 'rxjs';
export interface AuthenticationFunctionalities {
    /**
     * Base maps to use by default.
     */
    default_basemap: string[];
    /**
     * Theme to use by default.
     */
    default_theme: string[];
    /**
     * A list of layer names that can be filtered.
     */
    filterable_layers?: string[];
    /**
     * When set, contains the name of the panel to open upon loading an application.
     */
    open_panel?: string[];
    /**
     * Default filtrable datasource name.
     */
    preset_layer_filter?: string[];
}
export interface RoleInfo {
    /**
     * Role identifier.
     */
    id: number;
    /**
     * Role name.
     */
    name: string;
}
export interface User {
    /**
     * User's email address.
     */
    email: string;
    /**
     * The user is in the intranet.
     */
    is_intranet: boolean;
    /**
     * Configured functionalities of the user.
     */
    functionalities: AuthenticationFunctionalities;
    /**
     * True if the password of the user has been changed. False otherwise.
     */
    is_password_changed: boolean;
    /**
     * Roles information.
     */
    roles: RoleInfo[];
    /**
     * The name of the user.
     */
    username: string;
    /**
     * The one-time-password Key
     */
    otp_key: string;
    /**
     * The one-time-password URI
     */
    otp_uri: string;
    /**
     * The two-factor authentication secret on first login
     */
    two_factor_totp_secret: string;
    /**
     * The server-side login type (oidc or local)
     */
    login_type?: string;
}
export declare enum UserState {
    LOGGED_IN = "logged in",
    LOGGED_OUT = "logged out",
    DISCONNECTED = "disconnected",
    READY = "ready",
    NOT_INITIALIZED = "not initialized"
}
export declare const loginMessageRequired: string;
/**
 * Object used to expose the login user information.
 *
 * Example of usage:
 * ```js
 *    (window as any).gmfapi.store.user.getProperties().subscribe({
 *      next: (user: User) => {
 *        ...
 *      },
 *    })
 * ```
 */
export declare class UserModel {
    /**
     * The observable user's properties. The default user is empty.
     *
     * @private
     */
    properties_: BehaviorSubject<User>;
    /**
     * The current state of the user. Default to NOT_INITIALIZED.
     *
     * @private
     */
    state_: UserState;
    /**
     * The login message when a private layer is opened in the permalink
     *
     * @private
     */
    loginMessage_: BehaviorSubject<string>;
    constructor();
    /**
     * @returns the observable user's properties.
     */
    getProperties(): BehaviorSubject<User>;
    /**
     * @returns the current user state.
     */
    getState(): UserState;
    /**
     * @returns The observable login message.
     */
    getLoginMessage(): BehaviorSubject<string>;
    /**
     * Set the current login message
     *
     * @param messageState The new login message.
     */
    setLoginMessage(messageState: string): void;
    /**
     * Set the current User's properties and state.
     *
     * @param properties The new user
     * @param state The new state
     */
    setUser(properties: User, state: UserState): void;
    /**
     * @returns an empty user.
     */
    getEmptyUserProperties(): User;
    /**
     * Check if the user has at least all required properties.
     *
     * @param properties The new user
     * @returns true if the properties are correct.
     * @private
     */
    checkUserProperties_(properties: User): boolean;
}
declare const user: UserModel;
export default user;
