import { IgrSeries } from "./igr-series";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { ItemToolTipLayer } from "./ItemToolTipLayer";
import { ensureBool } from "igniteui-react-core";
/**
 * Represents an annotation layer that displays tooltips for all target series individually.
*/
export class IgrItemToolTipLayer extends IgrAnnotationLayer {
    createImplementation() {
        return new ItemToolTipLayer();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets whether the default tooltip behaviors for the chart are disabled if this layer is present.
    */
    get isDefaultTooltipBehaviorDisabled() {
        return this.i.c2;
    }
    /**
     * 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.pk;
    }
    set targetSeriesName(v) {
        this.i.pk = v;
    }
    /**
     * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
    */
    get targetSeries() {
        if (this.i.pe == null) {
            return null;
        }
        if (!this.i.pe.externalObject) {
            let e = IgrSeries._createFromInternal(this.i.pe);
            if (e) {
                e._implementation = this.i.pe;
            }
            this.i.pe.externalObject = e;
        }
        return this.i.pe.externalObject;
    }
    set targetSeries(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.pe = null : this.i.pe = v.i;
    }
    /**
     * Gets or sets whether to use value interpolation when drawing the tooltips.
    */
    get useInterpolation() {
        return this.i.ph;
    }
    set useInterpolation(v) {
        this.i.ph = ensureBool(v);
    }
    /**
     * Gets or sets whether to skip past unknown values when searching for series values.
    */
    get skipUnknownValues() {
        return this.i.pg;
    }
    set skipUnknownValues(v) {
        this.i.pg = 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.j1();
    }
}
//# sourceMappingURL=igr-item-tool-tip-layer.js.map
