import Promise from 'bluebird';
import { IApiService } from './Api';
import { IStorageService } from './Storage';
export interface IUserDataService {
    META_HIDE_TUTORIAL: string;
    META_FAVS: string;
    META_LOGO: string;
    META_RECENTS: string;
    META_WORKSPACES: string;
    META_ACTIVE_WORKSPACE: string;
    userId: number;
    get(key?: string, defaultValue?: any, parse?: boolean): any;
    set(key: string, value: any, stringify?: boolean): Promise<any>;
    parse: (data: any) => void;
    refresh: () => any;
    destroy(): void;
    getFavs(): Promise<any>;
    updateFav(data: IUserDataFav): Promise<any>;
    addFav(data: IUserDataFav): Promise<any>;
    removeFav(data: IUserDataFav): Promise<any>;
    toggleFav(data: IUserDataFav): Promise<any>;
    getFavLink(folderId: number, pageId: number): string;
    isFav(folderId: number, pageId: number): boolean;
    getRecents(): IUserDataFav[];
    updateRecent(data: IUserDataFav): void;
    addRecent(data: IUserDataFav): void;
    saveWorkspaces(workspaces: IUserDataWorkspace[]): Promise<any>;
    getWorkspaces(): Promise<any>;
    getNewWorkspace(): IUserDataWorkspace;
    addWorkspace(data: IUserDataWorkspace): Promise<any>;
    removeWorkspace(id: string): Promise<any>;
}
export interface IUserDataFav {
    link: string;
    title: string;
    type: number;
}
export interface IUserDataWorkspaceTileCoords {
    x: number;
    y: number;
    w: number;
    h: number;
    z: number;
}
export interface IUserDataWorkspaceTile {
    title: string;
    type: string;
    domain: string;
    page: string;
    tile: IUserDataWorkspaceTileCoords;
    fit?: string;
    state?: string;
}
export interface IUserDataWorkspace {
    name: string;
    id: string;
    freeze: false;
    boards: IUserDataWorkspaceTile[];
    unit: '%';
}
declare class UserData implements IUserDataService {
    api: IApiService;
    storage: IStorageService;
    userId: number;
    readonly META_HIDE_TUTORIAL: string;
    readonly META_FAVS: string;
    readonly META_LOGO: string;
    readonly META_RECENTS: string;
    readonly META_WORKSPACES: string;
    readonly META_ACTIVE_WORKSPACE: string;
    recentsLimit: number;
    private _data;
    private _favs;
    private _links;
    private _workspaces;
    constructor(api: IApiService, storage: IStorageService, userId: number);
    readonly favs: IUserDataFav[];
    parse(data: any): void;
    set(key: string, value: any, stringify?: boolean): Promise<any>;
    refresh(): any;
    get(key?: string, defaultValue?: any, parse?: boolean): any;
    destroy(): void;
    getRecents(): IUserDataFav[];
    updateRecent(data: IUserDataFav): void;
    addRecent(data: IUserDataFav): void;
    getFavs(): Promise<any>;
    updateFav(data: IUserDataFav): Promise<any>;
    setFavName(folderId: number, pageId: number, title: string): boolean;
    saveFavs(): Promise<any>;
    addFav(data: IUserDataFav): Promise<any>;
    removeFav(data: IUserDataFav): Promise<any>;
    toggleFav(data: IUserDataFav): Promise<any>;
    getFavLink(folderId: number, pageId: number): string;
    isFav(folderId: number, pageId: number): boolean;
    saveWorkspaces(workspaces: IUserDataWorkspace[]): Promise<any>;
    getNewWorkspace(): IUserDataWorkspace;
    getWorkspaces(): Promise<any>;
    addWorkspace(data: IUserDataWorkspace): Promise<any>;
    removeWorkspace(id: string): Promise<any>;
    setWorkspaces(data: any): any;
    private checkForFavDuplicate;
    private saveRecents;
}
export default UserData;
