import { __extends } from "tslib";
import { IgrSeries } from "./igr-series";
import { CategoryItemHighlightType_$type } from "./CategoryItemHighlightType";
import { MarkerType_$type } from "./MarkerType";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { CategoryItemHighlightLayer } from "./CategoryItemHighlightLayer";
import { ensureBool, ensureEnum, brushToString, stringToBrush } from "igniteui-react-core";
/**
 * Represents an annotation layer that highlights items in a series that use a category axis
 * either by drawing a banded shape at their position, or by rendering a marker at their position.
 * Depending on the type of series, the default highlight will be affected. To override
 * the type of highlight used, you can set the HighlightType property.
*/
var IgrCategoryItemHighlightLayer = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgrCategoryItemHighlightLayer, _super);
    function IgrCategoryItemHighlightLayer(props) {
        return _super.call(this, props) || this;
    }
    IgrCategoryItemHighlightLayer.prototype.createImplementation = function () {
        return new CategoryItemHighlightLayer();
    };
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "isAnnotationHoverLayer", {
        /**
         * Gets whether the series is an annotation layer displayed only when hovering over the chart.
        */
        get: function () {
            return this.i.d6;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "targetSeries", {
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            var r = this.i.w6;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgrSeries._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.w6 = null : this.i.w6 = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "targetSeriesName", {
        /**
         * Gets or sets the name of the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            return this.i.xk;
        },
        set: function (v) {
            this.i.xk = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "useInterpolation", {
        /**
         * Gets or sets whether to use value interpolation when drawing a line through the best value for the pointer position.
        */
        get: function () {
            return this.i.xa;
        },
        set: function (v) {
            this.i.xa = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "highlightType", {
        /**
         * Gets or sets which type of highlight shape to use when highlighting items.
        */
        get: function () {
            return this.i.w3;
        },
        set: function (v) {
            this.i.w3 = ensureEnum(CategoryItemHighlightType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "markerType", {
        /**
         * Gets or sets which type of marker to use when highlighting items, if appropriate.
        */
        get: function () {
            return this.i.w5;
        },
        set: function (v) {
            this.i.w5 = ensureEnum(MarkerType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "markerBrush", {
        /**
         * Gets or sets which color to use for the marker when highlighting items, if appropriate.
        */
        get: function () {
            return brushToString(this.i.x4);
        },
        set: function (v) {
            this.i.x4 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "markerOutline", {
        /**
         * Gets or sets which outline color to use for the marker when highlighting items, if appropriate.
        */
        get: function () {
            return brushToString(this.i.x5);
        },
        set: function (v) {
            this.i.x5 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "markerTemplate", {
        /**
         * Gets or sets the template to use for marker visuals for the current series object.
        */
        get: function () {
            return this.i.xt;
        },
        set: function (v) {
            this.i.xt = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "bandHighlightWidth", {
        /**
         * Gets or sets the width to use for the highlight region if highlighting items in a grid aligned series (line, spline, etc), with a banded shape.
        */
        get: function () {
            return this.i.xc;
        },
        set: function (v) {
            this.i.xc = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategoryItemHighlightLayer.prototype, "skipUnknownValues", {
        /**
         * Gets or sets whether to skip unknown values when searching for series values.
        */
        get: function () {
            return this.i.w9;
        },
        set: function (v) {
            this.i.w9 = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    IgrCategoryItemHighlightLayer.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
            return this.targetSeries;
        }
        return null;
    };
    IgrCategoryItemHighlightLayer.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.targetSeries && this.targetSeries._styling) {
            this.targetSeries._styling(container, component, this);
        }
        this._inStyling = false;
    };
    return IgrCategoryItemHighlightLayer;
}(IgrAnnotationLayer));
export { IgrCategoryItemHighlightLayer };
