/**
 * @mergeTarget
 * @module Src/Storage
 */
import { LisioUser, LisioUserParsed } from "./lisio-user.js";
import { LisioBooleanParameterNames } from "./parameter/lisio-boolean-parameter.js";
import { LisioNumericParameterNames } from "./parameter/lisio-numeric-parameter.js";
import { LisioParameterNames } from "./parameter/lisio-parameter.js";
import { LisioStringParameterNames } from "./parameter/lisio-string-parameter.js";
import { LisioProfileNames } from "./profile/lisio-profile.js";
import { StorageInterface } from "./storage-interface.js";
/**
 * Type to describe update operations
 */
type UpdateOperations = {
    add?: OperationsAdd;
    update?: OperationsUpdate;
    remove?: OperationsRemove;
};
/**
 * Type to describe add parameters operation
 */
type OperationAddParameters = {
    name: LisioNumericParameterNames;
    value: number;
} | {
    name: LisioStringParameterNames;
    value: string;
} | {
    name: LisioBooleanParameterNames;
    value: boolean;
};
/**
 * Type to describe add operation
 */
type OperationsAdd = {
    parameters?: OperationAddParameters[];
    profiles?: {
        name: LisioProfileNames;
    }[];
};
/**
 * Type to describe update operation
 */
type OperationsUpdate = ({
    name: LisioNumericParameterNames;
    value: number;
} | {
    name: LisioStringParameterNames;
    value: string;
} | {
    name: LisioBooleanParameterNames;
    value: boolean;
})[];
/**
 * Type to desribe remove operation
 */
type OperationsRemove = {
    parameters?: LisioParameterNames[];
    profiles?: LisioProfileNames[];
};
/**
 * Interface for storage.\
 * It aims to centralize all interaction with a {@link Src/Storage.StorageInterface | StorageInterface}.\
 * To execute his responsability this class does :
 *  * Gets all saved users
 *  * Gets selected saved user
 *  * Saves an user
 *  * Renames user
 *  * Updates selected saved user
 *  * Switchs selected saved user
 *  * Deletes all users
 *  * Deletes desired user
 *  * Checks storage version
 *  * Gets saved popin state
 *  * Saves popin state
 *  * Gets saved process state
 *  * Saves process state
 */
declare class StorageController {
    /**
     * Private attribute to store a storage interface
     * @source
     */
    private _storageInterface;
    /**
     * Privcate attribute to store current storage version
     * @source
     */
    private _storageVersion;
    /**
     * Getter for attribute {@link _storageVersion | _storageVersion}
     * @returns Returns _storageVersion attribute
     * @source
     */
    get storageVersion(): number;
    /**
     * @async
     * Public method to get all saved users
     * @returns Returns a promise containing all saved users
     * @source
     */
    getAllUsers(): Promise<LisioUserParsed[]>;
    /**
   * @async
   * Public method to get clear users
   * @returns Returns a promise containing nothing
   * @source
   */
    clearUsers(): Promise<void>;
    /**
     * @async
     * Public method to save an user
     * @param {LisioUserParsed} user - User to save
     * @returns Returns a promise containing nothing
     */
    setUser(user: LisioUserParsed): Promise<void>;
    /**
     * @async
     * Public method to save an user
     * @param {LisioUser} user - User to save
     * @returns Returns a promise containing nothing
     */
    setUser(user: LisioUser): Promise<void>;
    /**
     * @async
     * Public method to rename saved user
     * @param {string} currentUsername - Current username
     * @param {string} newUsername - New username
     * @returns Returns a promise containing nothing
     * @source
     */
    renameUser(currentUsername: string, newUsername: string): Promise<void>;
    /**
     * @async
     * Public method to check saved storage version
     * @returns Returns a promise containing nothing
     * @source
     */
    checkStorageVersion(): Promise<void>;
    /**
     * @async
     * Public method to update saved user
     * @param {LisioUserParsed} user - User to update
     * @param {UpdateOperations} operations - Update operations
     * @returns Returns a promise containing nothing
     * @source
     */
    updateUser(user: LisioUserParsed, operations: UpdateOperations): Promise<void>;
    /**
     * @async
     * Public method to get saved selected user
     * @returns Returns a promise containing a saved user
     * @source
     */
    getSelectedUser(): Promise<LisioUser>;
    /**
     * @async
     * Public method to switch selected user and update storage
     * @param {string} newSelectedUsername - Username of new user to select
     * @returns Returns new selected user
     * @source
     */
    switchSelectedUser(newSelectedUsername: string): Promise<LisioUser>;
    /**
     * @async
     * Method to delete desired saved user
     * @param {string} username - Username of user to delete
     * @returns Returns a promise containing nothing
     * @source
     */
    deleteUser(username: string): Promise<void>;
    /**
     * @async
     * Method to delete all saved users
     * @returns Returns a promise containing nothing
     * @source
     */
    deleteAllUsers(): Promise<void>;
    /**
     * Private method to convert array of parameter to map of parameters
     * @param {LisioParameterParsed[]} customParametersArray - Array of parameters
     * @returns Returns mapped parameters
     * @source
     */
    private convertCustomParametersArrayToCustomParametersMap;
    /**
     * @async
     * Method to get saved popin state
     * @returns Returns a promise containing popin state
     * @source
     */
    getIsPopinHidden(): Promise<boolean>;
    /**
     * @async
     * Method to save popin state
     * @param {boolean} value - Save popin state
     * @returns Returns a promise containing nothing
     * @source
     */
    setIsPopinHidden(value: boolean): Promise<void>;
    /**
     * @async
     * Method to get saved process state
     * @returns Returns a promise containing process state
     * @source
     */
    getIsProcessEnd(): Promise<boolean>;
    /**
     * @async
     * Method to save process state
     * @param {boolean} value - New process state
     * @returns Returns a promise containing nothing
     * @source
     */
    setIsProcessEnd(value: boolean): Promise<void>;
    /**
     * Constructor of class {@link StorageInterface | StorageInterface}
     * @param {StorageInterface} storageInterface - Storage interface
     * @source
     */
    constructor(storageInterface: StorageInterface);
}
export { StorageController };
export type { OperationsAdd, OperationsRemove, OperationsUpdate, OperationAddParameters, UpdateOperations, };
