import * as tslib_1 from "tslib";
import { Visibility_$type } from "igniteui-react-core/ES5/Visibility";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { CrosshairLayer } from "./CrosshairLayer";
import { brushToString, stringToBrush, ensureBool, ensureEnum } from "igniteui-react-core/ES5/componentUtil";
/**
 * Represents an annotation layer that displays crosshair lines that cross through the closest value of the target series under the cursor.
*/
var IgrCrosshairLayer = /** @class */ (function (_super) {
    tslib_1.__extends(IgrCrosshairLayer, _super);
    function IgrCrosshairLayer(props) {
        return _super.call(this, props) || this;
    }
    IgrCrosshairLayer.prototype.createImplementation = function () {
        return new CrosshairLayer();
    };
    Object.defineProperty(IgrCrosshairLayer.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "horizontalLineStroke", {
        /**
         * Gets or sets the color to use for the horizontal line. Leave null for an automatic value.
        */
        get: function () {
            return brushToString(this.i.oa);
        },
        set: function (v) {
            this.i.oa = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "verticalLineStroke", {
        /**
         * Gets or sets the color to use for vertical line. Leave null for an automatic value.
        */
        get: function () {
            return brushToString(this.i.ob);
        },
        set: function (v) {
            this.i.ob = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "targetSeries", {
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            if (this.i.mr == null) {
                return null;
            }
            return this.i.mr.externalObject;
        },
        set: function (v) {
            v == null ? this.i.mr = null : this.i.mr = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "useInterpolation", {
        /**
         * Gets or sets whether to use value interpolation when drawing a line through the best value for the cursor position.
        */
        get: function () {
            return this.i.mu;
        },
        set: function (v) {
            this.i.mu = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "isAxisAnnotationEnabled", {
        /**
         * Gets or sets whether to use value interpolation when drawing a line through the best value for the cursor position.
        */
        get: function () {
            return this.i.ms;
        },
        set: function (v) {
            this.i.ms = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "xAxisAnnotationTextColor", {
        /**
         * Gets or sets the color to use for the x axis annotation text. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.oe);
        },
        set: function (v) {
            this.i.oe = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "xAxisAnnotationBackground", {
        /**
         * Gets or sets the color to use for the x axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.oc);
        },
        set: function (v) {
            this.i.oc = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "xAxisAnnotationInterpolatedValuePrecision", {
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get: function () {
            return this.i.m1;
        },
        set: function (v) {
            this.i.m1 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "xAxisAnnotationOutline", {
        /**
         * Gets or sets the color to use for the x axis annotation outline. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.od);
        },
        set: function (v) {
            this.i.od = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "xAxisAnnotationPadding", {
        /**
         * Gets or sets the padding for the x axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.mx;
        },
        set: function (v) {
            this.i.mx = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "xAxisAnnotationStrokeThickness", {
        /**
         * Gets or sets the stroke thickness for the x axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.my;
        },
        set: function (v) {
            this.i.my = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "yAxisAnnotationTextColor", {
        /**
         * Gets or sets the color to use for the y axis annotation text. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.oh);
        },
        set: function (v) {
            this.i.oh = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "yAxisAnnotationBackground", {
        /**
         * Gets or sets the color to use for the y axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.of);
        },
        set: function (v) {
            this.i.of = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "yAxisAnnotationInterpolatedValuePrecision", {
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get: function () {
            return this.i.m2;
        },
        set: function (v) {
            this.i.m2 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "yAxisAnnotationOutline", {
        /**
         * Gets or sets the color to use for the y axis annotation outline. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.og);
        },
        set: function (v) {
            this.i.og = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "yAxisAnnotationPadding", {
        /**
         * Gets or sets the padding for the y axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.mz;
        },
        set: function (v) {
            this.i.mz = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "yAxisAnnotationStrokeThickness", {
        /**
         * Gets or sets the stroke thickness for the y axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.m0;
        },
        set: function (v) {
            this.i.m0 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "verticalLineVisibility", {
        /**
         * Gets or sets whether to display the vertical line.
        */
        get: function () {
            return this.i.oj;
        },
        set: function (v) {
            this.i.oj = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "horizontalLineVisibility", {
        /**
         * Gets or sets whether to display the horizontal line.
        */
        get: function () {
            return this.i.oi;
        },
        set: function (v) {
            this.i.oi = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCrosshairLayer.prototype, "skipUnknownValues", {
        /**
         * Gets or sets whether to skip unknown values when searching for series values.
        */
        get: function () {
            return this.i.mt;
        },
        set: function (v) {
            this.i.mt = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    return IgrCrosshairLayer;
}(IgrAnnotationLayer));
export { IgrCrosshairLayer };
