import { InjectionToken } from '@angular/core';
import { ActivatedRoute, ActivatedRouteSnapshot, CanActivate, CanDeactivate, Router, RouterStateSnapshot } from '@angular/router';
import { CurrentDeviceService } from '@iotize/ionic';
import { Observable, Subscription } from 'rxjs';
export declare const DEVICE_AUTH_GUARD_CONFIG: InjectionToken<unknown>;
export interface DeviceAuthGuardRouteData {
    disableAuthGuardOnPage?: boolean;
    username?: string[] | string;
}
export interface DeviceAuthGuardConfig {
    loginUrl: string;
}
export declare class DeviceAuthGuard implements CanActivate, CanDeactivate<any> {
    private tapService;
    private router;
    private route;
    config: DeviceAuthGuardConfig;
    private subscriptions;
    constructor(tapService: CurrentDeviceService, router: Router, route: ActivatedRoute, config: DeviceAuthGuardConfig);
    canDeactivate(component: any, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): boolean;
    canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean;
    private onUnauthorized;
    /**
     * Listen to session state changes for the given route. It it's the active route, we redirect to login
     * @param activatedRoute
     * @param state
     */
    setupSessionStateListener(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Subscription;
}
