/*
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, Input } from '@angular/core';
import { IgxTemplateContentComponent } from './igx-template-content-component';
import { TypeRegistrar } from './type';
import * as i0 from "@angular/core";
import * as i1 from "./igx-template-content-component";
import * as i2 from "@angular/common";
export let IgxTooltipContainerComponent = /*@__PURE__*/ (() => {
    class IgxTooltipContainerComponent {
        constructor(_changeDetectorRef) {
            this._changeDetectorRef = _changeDetectorRef;
            this._template = null;
            this._containerTemplate = null;
            this._context = null;
        }
        set template(value) {
            this._template = value;
            if (this._context != null) {
                this._changeDetectorRef.detectChanges();
            }
        }
        get template() {
            return this._template;
        }
        set containerTemplate(value) {
            this._containerTemplate = value;
            if (this._context != null) {
                this._changeDetectorRef.detectChanges();
            }
        }
        get containerTemplate() {
            return this._containerTemplate;
        }
        set context(value) {
            this._context = value;
            this._changeDetectorRef.detectChanges();
            if (this._tooltipContent != null) {
                this._tooltipContent.markChanged();
            }
            //console.log("tool:" + this._tooltipContent != null);
        }
        get context() {
            return this._context;
        }
        static register() {
            TypeRegistrar.registerCons("IgxTooltipContainerComponent", IgxTooltipContainerComponent);
        }
    }
    IgxTooltipContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxTooltipContainerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
    IgxTooltipContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxTooltipContainerComponent, selector: "igx-tooltip-container", inputs: { template: "template", containerTemplate: "containerTemplate", context: "context" }, host: { classAttribute: "ig-tooltip-container igx-tooltip-container" }, viewQueries: [{ propertyName: "_tooltipContent", first: true, predicate: IgxTemplateContentComponent, descendants: true, static: true }], ngImport: i0, template: `
    <ng-template #defaultContainer>
        <div class='ig-tooltip-container-background' *ngIf="context !== null && context.item !== null"
            [style.border-color]="context && context.isSubContent ? 'transparent' : '#666'">
            <igx-template-content *ngIf="context !== null" [template]="template" [context]="context"></igx-template-content>
        </div>
    </ng-template>
    <ng-container *ngTemplateOutlet="containerTemplate ? containerTemplate : defaultContainer; context: context">
    </ng-container>
  `, isInline: true, styles: ["\n        .ig-tooltip-container-background {\n            padding: 5px; \n            padding: var(--tooltip-container-padding, 5px);\n            background-color: white; \n            background-color: var(--tooltip-container-background-color, white);\n            border-style: solid; \n            border-style: var(--tooltip-container-border-style, solid);\n            border-width: 1px; \n            border-width: var(--tooltip-container-border-width, 1px);\n            color: inherit; \n            color: var(--tooltip-container-text-color, inherit);\n            pointer-events: none;\n            white-space: nowrap;\n        }\n"], components: [{ type: i1.IgxTemplateContentComponent, selector: "igx-template-content", inputs: ["template", "context"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxTooltipContainerComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxTooltipContainerComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-tooltip-container',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    host: { class: "ig-tooltip-container igx-tooltip-container" },
                    template: `
    <ng-template #defaultContainer>
        <div class='ig-tooltip-container-background' *ngIf="context !== null && context.item !== null"
            [style.border-color]="context && context.isSubContent ? 'transparent' : '#666'">
            <igx-template-content *ngIf="context !== null" [template]="template" [context]="context"></igx-template-content>
        </div>
    </ng-template>
    <ng-container *ngTemplateOutlet="containerTemplate ? containerTemplate : defaultContainer; context: context">
    </ng-container>
  `,
                    styles: [`
        .ig-tooltip-container-background {
            padding: 5px; 
            padding: var(--tooltip-container-padding, 5px);
            background-color: white; 
            background-color: var(--tooltip-container-background-color, white);
            border-style: solid; 
            border-style: var(--tooltip-container-border-style, solid);
            border-width: 1px; 
            border-width: var(--tooltip-container-border-width, 1px);
            color: inherit; 
            color: var(--tooltip-container-text-color, inherit);
            pointer-events: none;
            white-space: nowrap;
        }
`]
                }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { _tooltipContent: [{
                type: ViewChild,
                args: [IgxTemplateContentComponent, { static: true }]
            }], template: [{
                type: Input
            }], containerTemplate: [{
                type: Input
            }], context: [{
                type: Input
            }] } });
