import { ApplicationRef, ComponentFactoryResolver, ElementRef, InjectionToken, Injector } from '@angular/core';
import { DomPortalOutlet, ComponentType } from '@angular/cdk/portal';
import * as i0 from "@angular/core";
export declare const DYNAMIC_COMPONENT_CONFIG: InjectionToken<object>;
export declare class EuiDynamicComponentService {
    /**
     * @deprecated will be removed in the next major version
     * @breaking-change 21.0.0
     */
    private componentFactoryResolver;
    private injector;
    private appRef;
    private portalHost;
    private portal;
    private portalComponentInstance;
    constructor(
    /**
     * @deprecated will be removed in the next major version
     * @breaking-change 21.0.0
     */
    componentFactoryResolver: ComponentFactoryResolver, injector: Injector, appRef: ApplicationRef);
    /**
     * Adds a component to portal host dynamically
     * @param component The component to be injected
     * @param el The element reference for the component to be injected
     * @param config The data to be passed (config) for the DYNAMIC_COMPONENT_CONFIG token
     */
    add<T>(component: ComponentType<T>, el?: ElementRef, config?: any): any;
    /**
     * detaches a portalHost
     * @param portalHostRef reference of portal host to be detached
     */
    remove(portalHostRef: DomPortalOutlet): void;
    /**
     * creates a custom injector to be used when providing custom injection tokens to components inside a portal
     * @param data to be used by DYNAMIC_COMPONENT_CONFIG token
     */
    private createInjector;
    static ɵfac: i0.ɵɵFactoryDeclaration<EuiDynamicComponentService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<EuiDynamicComponentService>;
}
//# sourceMappingURL=dynamic-component.service.d.ts.map