import { Injector, TemplateRef, ViewRef, ViewContainerRef, RendererFactory2, ComponentRef, ComponentFactoryResolver } from '@angular/core';
import { ConnectionPosition } from './position.interface';
/**
 * Class that allows for inserting Text or TemplateRef.
 */
export declare class ContentRef {
    nodes: any[];
    viewRef?: ViewRef | undefined;
    _componentRef?: ComponentRef<any> | undefined;
    constructor(nodes: any[], viewRef?: ViewRef | undefined, _componentRef?: ComponentRef<any> | undefined);
}
export declare class DynamicComponentService<T> {
    private _injector;
    private rendererFactory;
    private _componentFactoryResolver;
    /** It’s not a good idea to inject Renderer2 in Service. so create it in constructor */
    private _renderer;
    /** created component reference */
    private _componentRef;
    /** places a new component as the content */
    private _contentRef;
    /** places a new component at this container */
    private _viewContainerRef;
    /** Subscription to viewport resize events. */
    private _resizeSubscription;
    /** attachment element's calculated position */
    originPos: ConnectionPosition;
    /** overlay element's calculated position */
    overlayPos: ConnectionPosition;
    /** overlay element's original position such as 'bottom-top' */
    placement: string;
    constructor(_injector: Injector, rendererFactory: RendererFactory2, _componentFactoryResolver: ComponentFactoryResolver);
    /**
     * create the given component or text to DOM element using the ComponentFactoryResolver.
     *
     * @param { any } type
     * @param { string | TemplateRef<any> } content
     * @param { Element } hostDomElement
     * @param { any } context
     * @return { ComponentRef<T> } _componentRef
     */
    createDynamicComponent(viewContainerRef: ViewContainerRef, type: any, content: string | TemplateRef<any>, hostDomElement?: Element, context?: any): ComponentRef<T>;
    /**
     * dispose the created component and remove from the body and unsubscribe event
     */
    dispose(): void;
    /**
     * get content from given content
     * @param { string | TemplateRef<any> } content
     * @param { any } context
     * @return { ContentRef }
     */
    private _getContentRef;
    /**
     * get component's root node for appending given element
     * @param { string | TemplateRef<any> } content
     * @return { HTMLElement }
     */
    getComponentRootNode(_componentRef: ComponentRef<any>): HTMLElement;
}
