/*
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, ViewChild, ChangeDetectionStrategy, TemplateRef, ChangeDetectorRef, Input } from '@angular/core';
import { IgxTemplateContentComponent } from './igx-template-content-component';
import { TypeRegistrar } from './type';
var IgxTooltipContainerComponent = /** @class */ (function () {
    function IgxTooltipContainerComponent(_changeDetectorRef) {
        this._changeDetectorRef = _changeDetectorRef;
        this._template = null;
        this._containerTemplate = null;
        this._context = null;
    }
    Object.defineProperty(IgxTooltipContainerComponent.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(IgxTooltipContainerComponent.prototype, "containerTemplate", {
        get: function () {
            return this._containerTemplate;
        },
        set: function (value) {
            this._containerTemplate = value;
            if (this._context != null) {
                this._changeDetectorRef.detectChanges();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTooltipContainerComponent.prototype, "context", {
        get: function () {
            return this._context;
        },
        set: function (value) {
            this._context = value;
            this._changeDetectorRef.detectChanges();
            if (this._tooltipContent != null) {
                this._tooltipContent.markChanged();
            }
            //console.log("tool:" + this._tooltipContent != null);
        },
        enumerable: true,
        configurable: true
    });
    IgxTooltipContainerComponent.register = function () {
        TypeRegistrar.registerCons("IgxTooltipContainerComponent", IgxTooltipContainerComponent);
    };
    IgxTooltipContainerComponent.decorators = [
        { type: Component, args: [{
                    selector: 'igx-tooltip-container',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    template: "\n    <ng-template #defaultContainer>\n        <div class='ui-tooltip-container' style=\"padding: 5px; background-color: white; border-color: #666; border-style: solid; border-width: 1px;\">\n            <igx-template-content *ngIf=\"context !== null\" [template]=\"template\" [context]=\"context\"></igx-template-content>\n        </div>\n    </ng-template>\n    <ng-container *ngTemplateOutlet=\"containerTemplate ? containerTemplate : defaultContainer; context: context\">\n    </ng-container>\n  ",
                    styles: []
                },] },
    ];
    /** @nocollapse */
    IgxTooltipContainerComponent.ctorParameters = function () { return [
        { type: ChangeDetectorRef, },
    ]; };
    IgxTooltipContainerComponent.propDecorators = {
        "_tooltipContent": [{ type: ViewChild, args: [IgxTemplateContentComponent,] },],
        "template": [{ type: Input },],
        "containerTemplate": [{ type: Input },],
        "context": [{ type: Input },],
    };
    return IgxTooltipContainerComponent;
}());
export { IgxTooltipContainerComponent };
//# sourceMappingURL=igx-tooltip-container-component.js.map