import { Injector } from '@angular/core';
import { ConnectionService } from '../api/connection.service';
import { Observable } from 'rxjs';
import { User } from '../classes/user';
import 'rxjs/add/observable/of';
import { ToastrService } from 'ngx-toastr';
import { Constants } from '../core.consts';
import { UserRoleType } from '../classes/user-role-type';
export declare class AuthService {
    private connection;
    private toastrService;
    private constants;
    private injector;
    private readonly JWT_TOKEN;
    private readonly REFRESH_TOKEN;
    private readonly EXPIRATES_IN;
    private readonly USER;
    private readonly MAIL;
    private readonly LOCALE;
    private readonly CHANNEL;
    private readonly CUSTOMER;
    private activeChannelChange;
    private loggedInSubject;
    private loggingInSubject;
    private userInSubject;
    private channelsUserSubject;
    private user;
    tokenApi: () => string;
    registerApi: () => string;
    registerWholesalerApi: () => string;
    confirmAccountApi: (token: any) => string;
    resetPasswordApi: (token: any) => string;
    recoverPasswordApi: () => string;
    countriesApi: () => string;
    waiting: boolean;
    loggedIn: Observable<any>;
    loggingIn: Observable<any>;
    userAuth: Observable<User>;
    channelsUser: Observable<any[]>;
    private customer;
    channel: any;
    channels: any[];
    private homeResolver;
    constructor(connection: ConnectionService, toastrService: ToastrService, constants: Constants, injector: Injector);
    /**
     * @desc Devuelve un observable
     * @param user Objeto que contiene username y password
     */
    login(user: {
        username: string;
        password: string;
    }, withRoles?: UserRoleType[]): Observable<any>;
    channelAccessPermission: (res: any) => boolean;
    channelAccess: (channel: any, user?: any) => void;
    /**
     * @desc Devuelve una promesa
     * @param user Objeto que contiene username y password
     */
    doLogin: (user: {
        username: string;
        password: string;
    }) => Promise<any>;
    getUserProfile(): Observable<User>;
    getUserProfileAsUser(): User;
    private getCurrentUserAsUser;
    private getCurrentUser;
    signUp: (data: any) => Observable<any>;
    isAuthenticated(): boolean;
    confirmAccount: (token: string) => Observable<any>;
    passwordReset: (new_password: any, token: any) => Observable<any>;
    recoverPassword: (email: string) => Observable<any>;
    logout(): void;
    refreshToken(): Observable<void>;
    getToken(): string;
    isTokenExpired: () => boolean;
    getExpiratesAt: () => string;
    doLoginUser(tokens: any): void;
    doLogoutUser(): void;
    private getRefreshToken;
    hasToRefresh: () => string;
    signUpWholesaler: (data: any) => Observable<any>;
    getCountriesData: () => Promise<any>;
    setActiveChannelChange: (activelyChangeChannelsOnLogin: boolean) => boolean;
    private isAllowedRole;
    private forceChannelsForSeller;
    setCustomer: (customer: any) => void;
    getCustomer: () => any;
    setHomeResolver: (resolverFunction: any) => any;
    getHomeResolver: () => any;
    isAbleToBuy: () => boolean;
}
