import * as tslib_1 from "tslib";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { CategoryHighlightLayer } from "./CategoryHighlightLayer";
import { ensureBool } from "igniteui-react-core/ES5/componentUtil";
/**
 * Represents an annotation layer that targets a category axis, or all category axes in the chart.
 * If the axis contains any series that are aligned between major gridlines of the axis (column, waterfall, etc) this will render a shape that fills the current category.
 * Otherwise it will render a band with an adjustable thickness at the closest gridline to the pointer position.
 * Setting UseIterpolation to true will cause the x position in the latter case to become affixed to the x position of the pointer.
*/
var IgrCategoryHighlightLayer = /** @class */ (function (_super) {
    tslib_1.__extends(IgrCategoryHighlightLayer, _super);
    function IgrCategoryHighlightLayer(props) {
        return _super.call(this, props) || this;
    }
    IgrCategoryHighlightLayer.prototype.createImplementation = function () {
        return new CategoryHighlightLayer();
    };
    Object.defineProperty(IgrCategoryHighlightLayer.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryHighlightLayer.prototype, "targetAxis", {
        /**
         * Gets or sets the axis to target this annotation to. If null, this annotation targets all category axes simultaneously.
        */
        get: function () {
            if (this.i.mv == null) {
                return null;
            }
            return this.i.mv.externalObject;
        },
        set: function (v) {
            v == null ? this.i.mv = null : this.i.mv = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryHighlightLayer.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.my;
        },
        set: function (v) {
            this.i.my = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryHighlightLayer.prototype, "bandHighlightWidth", {
        /**
         * Gets or sets the width to use for the highlight region if drawing a band rather than filling a category.
        */
        get: function () {
            return this.i.mz;
        },
        set: function (v) {
            this.i.mz = +v;
        },
        enumerable: true,
        configurable: true
    });
    return IgrCategoryHighlightLayer;
}(IgrAnnotationLayer));
export { IgrCategoryHighlightLayer };
