import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxSeriesComponent } from "./igx-series-component";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { ItemToolTipLayer } from "./ItemToolTipLayer";
import { ensureBool } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents an annotation layer that displays tooltips for all target series individually.
*/
export let IgxItemToolTipLayerComponent = /*@__PURE__*/ (() => {
    class IgxItemToolTipLayerComponent extends IgxAnnotationLayerComponent {
        constructor() {
            super();
        }
        createImplementation() {
            return new ItemToolTipLayer();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets whether the series is an annotation layer displayed only when hovering over the chart.
        */
        get isAnnotationHoverLayer() {
            return this.i.db;
        }
        /**
         * Gets whether the default tooltip behaviors for the chart are disabled if this layer is present.
        */
        get isDefaultTooltipBehaviorDisabled() {
            return this.i.dk;
        }
        /**
         * Gets or sets the name of the series series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get targetSeriesName() {
            return this.i.re;
        }
        set targetSeriesName(v) {
            this.i.re = v;
        }
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get targetSeries() {
            if (this.i.q8 == null) {
                return null;
            }
            if (!this.i.q8.externalObject) {
                let e = IgxSeriesComponent._createFromInternal(this.i.q8);
                if (e) {
                    e._implementation = this.i.q8;
                }
                this.i.q8.externalObject = e;
            }
            return this.i.q8.externalObject;
        }
        set targetSeries(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.q8 = null : this.i.q8 = v.i;
        }
        /**
         * Gets or sets whether to use value interpolation when drawing the tooltips.
        */
        get useInterpolation() {
            return this.i.rb;
        }
        set useInterpolation(v) {
            this.i.rb = ensureBool(v);
        }
        /**
         * Gets or sets whether to skip past unknown values when searching for series values.
        */
        get skipUnknownValues() {
            return this.i.ra;
        }
        set skipUnknownValues(v) {
            this.i.ra = ensureBool(v);
        }
        findByName(name) {
            var baseResult = super.findByName(name);
            if (baseResult) {
                return baseResult;
            }
            if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
                return this.targetSeries;
            }
            return null;
        }
        _styling(container, component, parent) {
            super._styling(container, component, parent);
            this._inStyling = true;
            if (this.targetSeries && this.targetSeries._styling) {
                this.targetSeries._styling(container, component, this);
            }
            this._inStyling = false;
        }
        /**
         * Hides any tooltips presented by the layer, if any.
        
        */
        hideToolTips() {
            this.i.ld();
        }
    }
    IgxItemToolTipLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxItemToolTipLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxItemToolTipLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxItemToolTipLayerComponent, selector: "igx-item-tool-tip-layer", inputs: { targetSeriesName: "targetSeriesName", targetSeries: "targetSeries", useInterpolation: "useInterpolation", skipUnknownValues: "skipUnknownValues" }, providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxItemToolTipLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxItemToolTipLayerComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxItemToolTipLayerComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxItemToolTipLayerComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-item-tool-tip-layer',
                    template: ``,
                    providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxItemToolTipLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxItemToolTipLayerComponent) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { targetSeriesName: [{
                type: Input
            }], targetSeries: [{
                type: Input
            }], useInterpolation: [{
                type: Input
            }], skipUnknownValues: [{
                type: Input
            }] } });
