/*
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, EventEmitter, Output, ViewChild, ChangeDetectionStrategy } from '@angular/core';
import { TypeRegistrar } from "./type";
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
var IgxSimpleDefaultTooltipComponent = /** @class */ /*@__PURE__*/ (function () {
    function IgxSimpleDefaultTooltipComponent(_changeDetectorRef) {
        this._changeDetectorRef = _changeDetectorRef;
        this.onContentReady = new EventEmitter();
    }
    IgxSimpleDefaultTooltipComponent.prototype.ensureDefaultTooltip = function (gauge) {
        if (gauge.showToolTip) {
            gauge.tooltipTemplate = this.tooltip;
        }
        else {
            gauge.tooltipTemplate = null;
        }
    };
    IgxSimpleDefaultTooltipComponent.prototype.getLabel = function (context) {
        if (context.itemName == null) {
            var label = context.label.split(":");
            return label.length < 2 ? context.label : label[1].trim();
        }
        return context.label;
    };
    IgxSimpleDefaultTooltipComponent.prototype.ngAfterContentInit = function () {
        this.onContentReady.emit({});
    };
    IgxSimpleDefaultTooltipComponent.register = function () {
        TypeRegistrar.registerCons("IgxSimpleDefaultTooltipComponent", IgxSimpleDefaultTooltipComponent);
    };
    IgxSimpleDefaultTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxSimpleDefaultTooltipComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
    IgxSimpleDefaultTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxSimpleDefaultTooltipComponent, selector: "igx-simple-default-tooltips", outputs: { onContentReady: "onContentReady" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true, static: true }], ngImport: i0, template: "  \n  <ng-template #tooltip let-context=\"i\" >\n    <div class='ui-simple-default-tooltip-content' *ngIf=\"context\">\n        <span  style=\"white-space: nowrap;font-weight: bold;\" >{{getLabel(context)}}</span>\n    </div>\n  </ng-template>\n  ", isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxSimpleDefaultTooltipComponent;
}());
export { IgxSimpleDefaultTooltipComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxSimpleDefaultTooltipComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-simple-default-tooltips',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    template: "  \n  <ng-template #tooltip let-context=\"i\" >\n    <div class='ui-simple-default-tooltip-content' *ngIf=\"context\">\n        <span  style=\"white-space: nowrap;font-weight: bold;\" >{{getLabel(context)}}</span>\n    </div>\n  </ng-template>\n  ",
                    styles: []
                }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { tooltip: [{
                type: ViewChild,
                args: ["tooltip", { static: true }]
            }], onContentReady: [{
                type: Output
            }] } });
