import { Type } from "@angular/core";

/**
 * Used to get necessary data for dynamic component instantiation.
 *
 * @export
 * @interface ComponentData
 */
export interface ComponentData {
    /**
     * The type that is going to be instatiated dynamically.
     *
     * @type {Type<any>}
     * @memberof ComponentData
     */
    type: Type<any>;

    /**
     * This property should be used to pass a collection of key/value pair property values for the component type
     * that is being instantiated dynamically. It should be used only in cases where the afterComponentInit callback
     * cannot be used as it will not keep the strongly typed references to these properties.
     *
     * @type {{[property: string]: Object}}
     * @memberof ComponentData
     */
    properties?: {[property: string]: Object};
}
