/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Component, ChangeDetectionStrategy, TemplateRef, ChangeDetectorRef, Input, ViewContainerRef } from '@angular/core';
export class IgxTemplateContentComponent {
    constructor(_changeDetectorRef, viewContainer) {
        this._changeDetectorRef = _changeDetectorRef;
        this.viewContainer = viewContainer;
        this._template = null;
        this._context = null;
    }
    set template(value) {
        this._template = value;
        if (this._context != null) {
            this._changeDetectorRef.detectChanges();
        }
    }
    get template() {
        return this._template;
    }
    set context(value) {
        if (this._context == null && value == null) {
            return;
        }
        this._context = value;
        this._changeDetectorRef.detectChanges();
    }
    get context() {
        return this._context;
    }
    markChanged() {
        this._changeDetectorRef.detectChanges();
    }
}
IgxTemplateContentComponent.decorators = [
    { type: Component, args: [{
                selector: 'igx-template-content',
                changeDetection: ChangeDetectionStrategy.OnPush,
                template: `
    <ng-template #defaultTemplate>
        <div></div>
    </ng-template>
    <ng-container *ngTemplateOutlet="template ? template : defaultTemplate; context: context">
    </ng-container>
  `,
                styles: [`
  :host {
    display: block;
  }`]
            },] },
];
/** @nocollapse */
IgxTemplateContentComponent.ctorParameters = () => [
    { type: ChangeDetectorRef, },
    { type: ViewContainerRef, },
];
IgxTemplateContentComponent.propDecorators = {
    "template": [{ type: Input },],
    "context": [{ type: Input },],
};
//# sourceMappingURL=igx-template-content-component.js.map