import { Injector, OnDestroy } from '@angular/core';
import { Logger } from '@anglr/common';
import { Dictionary } from '@jscrpt/common';
import { RelationsComponent } from '../../interfaces';
import { RelationsProcessorComponent } from '../../misc/types';
import { RelationsDebugger } from '../relationsDebugger/relationsDebugger.service';
import * as i0 from "@angular/core";
/**
 * Manager used for managing all components used in relations
 */
export declare class RelationsComponentManager implements OnDestroy {
    protected logger?: Logger | undefined;
    protected relationsDebugger?: RelationsDebugger | undefined;
    /**
     * Id of current scope
     */
    protected scopeId: string | null;
    /**
     * Registered components
     */
    protected components: Dictionary<RelationsComponent>;
    /**
     * Object storing all scopes and their managers
     */
    protected scopes: Dictionary<RelationsComponentManager[]>;
    /**
     * Instance of parent relations component manager
     */
    protected parent: RelationsComponentManager | null;
    /**
     * Cache containing children scoped components
     */
    protected childrenCache: Dictionary<RelationsComponent[]>;
    /**
     * Injector for angular DI
     */
    protected injector: Injector;
    constructor(logger?: Logger | undefined, relationsDebugger?: RelationsDebugger | undefined);
    /**
     * Called when component is destroyed
     */
    ngOnDestroy(): void;
    /**
     * Registers newly created component
     * @param id - Id of component to be registered
     * @param component - Instance of registered component
     */
    registerComponent(id: string, component: RelationsProcessorComponent): void;
    /**
     * Unregisters component
     * @param id - Id of component to be unregistered
     */
    unregisterComponent(id: string): void;
    /**
     * Gets instance of component or array of component instances or null
     * @param id - Unique identification of component, or components
     */
    get(id: string): RelationsProcessorComponent[] | RelationsProcessorComponent | null;
    /**
     * Gets id of relations component, for this manager
     * @param component - Component which id should be found
     */
    getId(component: RelationsComponent): string | null;
    /**
     * Opens new scope for relations component manager
     * @param id - Id of newly created scope
     */
    openScope(id: string): RelationsComponentManager;
    /**
     * Removes cached components from hierarchy
     * @param id - Id of component which will be removed from cache
     */
    protected removeCacheFromHierarchy(id: string): void;
    /**
     * Gets children components when scopes are used
     * @param id - Id of components to be get
     */
    protected getChildrenComponents(id: string): RelationsComponent[] | null;
    /**
     * Gets parent components when scopes are used
     * @param id - Id of component to be get
     */
    protected getParentComponents(id: string): RelationsComponent | null;
    static ɵfac: i0.ɵɵFactoryDeclaration<RelationsComponentManager, [{ optional: true; }, { optional: true; }]>;
    static ɵprov: i0.ɵɵInjectableDeclaration<RelationsComponentManager>;
}
//# sourceMappingURL=relationsComponentManager.service.d.ts.map