/*
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';
var IgxTemplateContentComponent = /** @class */ (function () {
    function IgxTemplateContentComponent(_changeDetectorRef, viewContainer) {
        this._changeDetectorRef = _changeDetectorRef;
        this.viewContainer = viewContainer;
        this._template = null;
        this._context = null;
    }
    Object.defineProperty(IgxTemplateContentComponent.prototype, "template", {
        get: function () {
            return this._template;
        },
        set: function (value) {
            this._template = value;
            if (this._context != null) {
                this._changeDetectorRef.detectChanges();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTemplateContentComponent.prototype, "context", {
        get: function () {
            return this._context;
        },
        set: function (value) {
            if (this._context == null && value == null) {
                return;
            }
            this._context = value;
            this._changeDetectorRef.detectChanges();
        },
        enumerable: true,
        configurable: true
    });
    IgxTemplateContentComponent.prototype.markChanged = function () {
        this._changeDetectorRef.detectChanges();
    };
    IgxTemplateContentComponent.decorators = [
        { type: Component, args: [{
                    selector: 'igx-template-content',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    template: "\n    <ng-template #defaultTemplate>\n        <div></div>\n    </ng-template>\n    <ng-container *ngTemplateOutlet=\"template ? template : defaultTemplate; context: context\">\n    </ng-container>\n  ",
                    styles: ["\n  :host {\n    display: block;\n  }"]
                },] },
    ];
    /** @nocollapse */
    IgxTemplateContentComponent.ctorParameters = function () { return [
        { type: ChangeDetectorRef, },
        { type: ViewContainerRef, },
    ]; };
    IgxTemplateContentComponent.propDecorators = {
        "template": [{ type: Input },],
        "context": [{ type: Input },],
    };
    return IgxTemplateContentComponent;
}());
export { IgxTemplateContentComponent };
//# sourceMappingURL=igx-template-content-component.js.map