import { InjectionToken } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate, CanDeactivate, Router, RouterStateSnapshot } from '@angular/router';
import { CurrentDeviceService } from '@iotize/ionic';
import { Observable, Subscription } from 'rxjs';
import * as i0 from "@angular/core";
export declare const DEVICE_AUTH_GUARD_CONFIG: InjectionToken<unknown>;
export interface DeviceAuthGuardConfig {
    loginUrl: string;
}
export declare class DeviceAuthGuard implements CanActivate, CanDeactivate<any> {
    private tapService;
    private router;
    config: DeviceAuthGuardConfig;
    private subscriptions;
    constructor(tapService: CurrentDeviceService, router: Router, 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  ActivatedRouteSnapshot
     * @param state RouterStateSnapshot
     */
    setupSessionStateListener(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Subscription;
    static ɵfac: i0.ɵɵFactoryDeclaration<DeviceAuthGuard, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<DeviceAuthGuard>;
}
