import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { CategoryHighlightLayer } from "./CategoryHighlightLayer";
import { ensureBool } from "igniteui-react-core/ES2015/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.
*/
export class IgrCategoryHighlightLayer extends IgrAnnotationLayer {
    createImplementation() {
        return new CategoryHighlightLayer();
    }
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets or sets the axis to target this annotation to. If null, this annotation targets all category axes simultaneously.
    */
    get targetAxis() {
        if (this.i.mv == null) {
            return null;
        }
        return this.i.mv.externalObject;
    }
    set targetAxis(v) {
        v == null ? this.i.mv = null : this.i.mv = v.i;
    }
    /**
     * Gets or sets whether to use value interpolation when drawing a line through the best value for the pointer position.
    */
    get useInterpolation() {
        return this.i.my;
    }
    set useInterpolation(v) {
        this.i.my = ensureBool(v);
    }
    /**
     * Gets or sets the width to use for the highlight region if drawing a band rather than filling a category.
    */
    get bandHighlightWidth() {
        return this.i.mz;
    }
    set bandHighlightWidth(v) {
        this.i.mz = +v;
    }
}
