import * as tslib_1 from "tslib";
import { IgrAxis } from "./igr-axis";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { CategoryToolTipLayer } from "./CategoryToolTipLayer";
import { ensureBool } from "igniteui-react-core";
/**
 * Represents an annotation layer that displays grouped tooltips for series that use a category axis.
*/
var IgrCategoryToolTipLayer = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgrCategoryToolTipLayer, _super);
    function IgrCategoryToolTipLayer(props) {
        return _super.call(this, props) || this;
    }
    IgrCategoryToolTipLayer.prototype.createImplementation = function () {
        return new CategoryToolTipLayer();
    };
    Object.defineProperty(IgrCategoryToolTipLayer.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryToolTipLayer.prototype, "isDefaultTooltipBehaviorDisabled", {
        /**
         * Gets whether the default tooltip behaviors for the chart are disabled if this layer is present.
        */
        get: function () {
            return this.i.c2;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryToolTipLayer.prototype, "targetAxis", {
        /**
         * Gets or sets the Axis to target this annotation to. If null, this annotation layer will not render content.
        */
        get: function () {
            if (this.i.pd == null) {
                return null;
            }
            if (!this.i.pd.externalObject) {
                var e = IgrAxis._createFromInternal(this.i.pd);
                if (e) {
                    e._implementation = this.i.pd;
                }
                this.i.pd.externalObject = e;
            }
            return this.i.pd.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.pd = null : this.i.pd = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryToolTipLayer.prototype, "useInterpolation", {
        /**
         * Gets or sets whether to use value interpolation when drawing the tooltips.
        */
        get: function () {
            return this.i.ph;
        },
        set: function (v) {
            this.i.ph = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    IgrCategoryToolTipLayer.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.targetAxis && this.targetAxis.name && this.targetAxis.name == name) {
            return this.targetAxis;
        }
        return null;
    };
    IgrCategoryToolTipLayer.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.targetAxis && this.targetAxis._styling) {
            this.targetAxis._styling(container, component, this);
        }
        this._inStyling = false;
    };
    /**
     * Hides any tooltips presented by the layer, if any.
    
    */
    IgrCategoryToolTipLayer.prototype.hideToolTips = function () {
        this.i.j1();
    };
    return IgrCategoryToolTipLayer;
}(IgrAnnotationLayer));
export { IgrCategoryToolTipLayer };
//# sourceMappingURL=igr-category-tool-tip-layer.js.map
