/**
 * @mergeTarget
 * @module Src/Storage
 */
import { LisioUserParsed } from "./lisio-user.js";
/**
 * Interface for storage.\
 * It aims to centralize all methods needed for storage to works with {@link Src/Storage.StorageController | StorageController}.\
 * A storage it's something that allows you to store datas, for exemple, LocalStorage API, cookies or web extension Storage API.\
 * To execute his responsability this class provides :
 *  * Method to get all saved users
 *  * Method to get desired saved user
 *  * Method to save an user
 *  * Method to rename user
 *  * Method to delete all users
 *  * Method to delete desired user
 *  * Method to save storage version
 *  * Method to get saved storage version
 *  * Method to clear storage
 *  * Method to clear users storage
 *  * Method to save popin state
 *  * Method to get saved popin state
 *  * Method to save process state
 *  * Method to saved get process state
 *  * Method to get saved usernames
 *  * Method to save an username
 *  * Method to remove desired saved username
 * @source
 */
interface StorageInterface {
    /**
     * @async
     * Method to get all saved users
     * @returns Returns a promise containing all saved users
     * @source
     */
    getAllUsers(): Promise<LisioUserParsed[]>;
    /**
     * @async
     * Method to get desired saved user
     * @param {string} username - Username of desired user
     * @returns Returns desired saved user if exists
     * @source
     */
    getUser(username: string): Promise<LisioUserParsed | undefined>;
    /**
     * @async
     * Method to save an user
     * @param {LisioUserParsed} user - User to save
     * @returns Returns a promise containing nothing
     * @source
     */
    setUser(user: LisioUserParsed): Promise<void>;
    /**
     * @async
     * Method to rename 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
     * Method to delete all users
     * @returns Returns a promise containing nothing
     * @source
     */
    deleteAllUsers(): Promise<void>;
    /**
     * @async
     * Method to delete desired user
     * @param {string} username - Username of user to delete
     * @returns Returns a promise containing nothing
     * @source
     */
    deleteUser(username: string): Promise<void>;
    /**
     * @async
     * Method to save storage version
     * @returns Returns a promise containing saved storage version
     * @source
     */
    getStorageVersion(): Promise<number>;
    /**
     * @async
     * Method to save storage version
     * @param {number} storageVersion - Save storage version
     * @returns Returns a promise containing nothing
     * @source
     */
    setStorageVersion(storageVersion: number): Promise<void>;
    /**
     * @async
     * Method to clear storage
     * @returns Returns a promise containing nothing
     * @source
     */
    clearAll(): Promise<void>;
    /**
   * @async
   * Method to clear users storage
   * @returns Returns a promise containing nothing
   * @source
   */
    clearUsers(): Promise<void>;
    /**
     * @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>;
    /**
     * @async
     * Method to get saved usernames
     * @returns Returns a promise containing all usernames
     * @source
     */
    getUsernames(): Promise<string[]>;
    /**
     * @async
     * Method to save an username
     * @param {string} username - Username to save
     * @returns Returns a promise containing nothing
     * @source
     */
    setUsername(username: string): Promise<void>;
    /**
     * @async
     * Method to remove desired saved username
     * @param {string} username - Desired username to remove
     * @returns Returns a promise containing nothing
     * @source
     */
    removeUsername(username: string): Promise<void>;
}
export { StorageInterface };
