import { OnDestroy, Type } from '@angular/core';
import { DynamicItemLoader } from '@anglr/dynamic';
import { LayoutComponentDef } from '@anglr/dynamic/layout';
import { LayoutComponentsIteratorService } from '@anglr/dynamic/layout-editor';
import { Dictionary } from '@jscrpt/common';
import { Subscription } from 'rxjs';
import { LayoutManager } from '../layoutManager/layoutManager.service';
import * as i0 from "@angular/core";
/**
 * Layout component register type definition
 */
export interface LayoutComponentsRegisterType {
    /**
     * Type that represents layout component
     */
    type: Type<any>;
    /**
     * Display name of layout component
     */
    displayName: string | undefined | null;
    /**
     * Package of layout component
     */
    package: string;
    /**
     * Name of layout component
     */
    name: string;
    /**
     * Scope of layout component
     */
    scope: string | undefined;
}
/**
 * Register for layout components that are part of relations
 */
export declare class LayoutComponentsRegister implements OnDestroy {
    protected layoutManager: LayoutManager;
    protected loader: DynamicItemLoader<LayoutComponentDef>;
    protected iteratorSvc: LayoutComponentsIteratorService;
    /**
     * Subscriptions created during initialization
     */
    protected initSubscriptions: Subscription;
    /**
     * Object storing defined types
     */
    protected definedTypes: Dictionary<LayoutComponentsRegisterType>;
    /**
     * Initialization promise
     */
    protected initPromise: Promise<void> | null;
    /**
     * Gets available types that are used as layout components
     */
    get types(): Promise<string[]>;
    constructor(layoutManager: LayoutManager, loader: DynamicItemLoader<LayoutComponentDef>, iteratorSvc: LayoutComponentsIteratorService);
    /**
     * Called when component is destroyed
     */
    ngOnDestroy(): void;
    /**
     * Gets type by its name
     * @param name - Name of type that should be obtained
     */
    getType(name: string): Promise<Type<any> | null>;
    /**
     * Gets display name of type by its name
     * @param name - Name of type that display name should be obtained
     */
    getDisplayName(name: string): Promise<string | undefined>;
    /**
     * Gets scope of type by its name
     * @param name - Name of type that scope should be obtained
     */
    getScope(name: string): Promise<string | undefined>;
    /**
     * Gets component name of type byt its name
     * @param name - Name of type that component name should be obtained
     */
    getComponentName(name: string): Promise<string | null>;
    /**
     * Gets component package of type byt its name
     * @param name - Name of type that component package should be obtained
     */
    getComponentPackage(name: string): Promise<string | null>;
    /**
     * Initialize layout types
     */
    protected initializeTypes(): Promise<void>;
    static ɵfac: i0.ɵɵFactoryDeclaration<LayoutComponentsRegister, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<LayoutComponentsRegister>;
}
//# sourceMappingURL=layoutComponentsRegister.service.d.ts.map