import { Injector } from '@angular/core';
import { ActivatedRoute, ActivatedRouteSnapshot, Data, Router } from '@angular/router';
import { IIdentified } from '@c8y/client';
import { ApiCall, ApiService } from '@c8y/ngx-components/api';
import { Observable, Subject } from 'rxjs';
import { TabsService } from '../tabs/tabs.service';
import { RouterTabsResolver } from './router-tabs.resolver';
import { ContextData, ViewContext } from './router.model';
import * as i0 from "@angular/core";
export declare class ContextRouteService {
    private tabsResolver;
    private tabsService;
    private router;
    private apiService;
    private injector;
    private dataSubscription;
    private routerSubscription;
    private lastAddedTabs;
    private ID_REGEX;
    refreshTrigger$: Subject<void>;
    /**
     * Last context data snapshot
     */
    activatedContextData: ContextData;
    constructor(tabsResolver: RouterTabsResolver, tabsService: TabsService, router: Router, apiService: ApiService, injector: Injector);
    /**
     * Resolves the current context data. If no context was found, null is returned.
     *
     * @param activatedRoute The current activated route.
     */
    getContextData(activatedRoute: ActivatedRoute | ActivatedRouteSnapshot): (Data & ContextData) | null;
    /**
     * Returns a route for the given ContextData.
     *
     * @param contextData The ContextData object.
     * @returns A route with the ids set correctly.
     */
    getContextRoute(contextData: ContextData): string;
    /**
     * Verifies if a given url is a view context route.
     *
     * @param url A route url.
     * @param contextToCheck The view context(s) to check. If not provided, all contexts are checked.
     * @returns true if the given url is a view context route.
     */
    isContextRoute(url: string, contextToCheck?: ViewContext[]): boolean;
    /**
     * @deprecated: Use ScopedContextRouteService instead. Will be removed in 10.22
     */
    init(route: ActivatedRoute): void;
    /**
     * @deprecated: Use ScopedContextRouteService instead. Will be removed in 10.22
     */
    destroy(): void;
    /**
     * Reloads all ViewContexts.
     */
    refreshContext(): void;
    /**
     * Sets a new contextData in the ActivatedRoute.
     * @param activatedRoute The current activated route.
     * @param contextData New contextData.
     */
    setContext(activatedRoute: ActivatedRoute, contextData: IIdentified): void;
    /**
     * @deprecated: Use ScopedContextRouteService instead. Will be removed in 10.21
     */
    updatedContext(route: ActivatedRoute): Observable<ApiCall>;
    private updateTabs;
    private redirectToFirstTab;
    private needsRedirect;
    private getMatchingContextRoute;
    private getSnapshot;
    private getContextDataSnapshot;
    static ɵfac: i0.ɵɵFactoryDeclaration<ContextRouteService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<ContextRouteService>;
}
//# sourceMappingURL=context-route.service.d.ts.map