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, brushToString, stringToBrush } 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.et;
        }
        /**
         * Gets whether the default tooltip behaviors for the chart are disabled if this layer is present.
        */
        get isDefaultTooltipBehaviorDisabled() {
            return this.i.e4;
        }
        /**
         * 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.aan;
        }
        set targetSeriesName(v) {
            this.i.aan = v;
        }
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get targetSeries() {
            const r = this.i.aag;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxSeriesComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        set targetSeries(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.aag = null : this.i.aag = v.i;
        }
        /**
         * Gets or sets whether to use value interpolation when drawing the tooltips.
        */
        get useInterpolation() {
            return this.i.aaj;
        }
        set useInterpolation(v) {
            this.i.aaj = ensureBool(v);
        }
        /**
         * Gets or sets whether to skip past unknown values when searching for series values.
        */
        get skipUnknownValues() {
            return this.i.aai;
        }
        set skipUnknownValues(v) {
            this.i.aai = ensureBool(v);
        }
        /**
         * Gets or sets the background of the tooltip containers.
        */
        get toolTipBackground() {
            return brushToString(this.i.aa3);
        }
        set toolTipBackground(v) {
            this.i.aa3 = stringToBrush(v);
        }
        /**
         * Gets or sets the border color of the tooltip containers.
        */
        get toolTipBorderBrush() {
            return brushToString(this.i.aa4);
        }
        set toolTipBorderBrush(v) {
            this.i.aa4 = stringToBrush(v);
        }
        /**
         * Gets or sets the border thickness of the tooltip containers.
        */
        get toolTipBorderThickness() {
            return this.i.aak;
        }
        set toolTipBorderThickness(v) {
            this.i.aak = +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.qd();
        }
        /**
         * Hides any tooltips presented by the layer, if any.
        
        */
        hideToolTipsImmediate() {
            this.i.qe();
        }
    }
    IgxItemToolTipLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxItemToolTipLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxItemToolTipLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxItemToolTipLayerComponent, selector: "igx-item-tool-tip-layer", inputs: { targetSeriesName: "targetSeriesName", targetSeries: "targetSeries", useInterpolation: "useInterpolation", skipUnknownValues: "skipUnknownValues", toolTipBackground: "toolTipBackground", toolTipBorderBrush: "toolTipBorderBrush", toolTipBorderThickness: "toolTipBorderThickness" }, 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.17", 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
            }], toolTipBackground: [{
                type: Input
            }], toolTipBorderBrush: [{
                type: Input
            }], toolTipBorderThickness: [{
                type: Input
            }] } });
