import { Visibility_$type } from "igniteui-react-core/ES2015/Visibility";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { CrosshairLayer } from "./CrosshairLayer";
import { brushToString, stringToBrush, ensureBool, ensureEnum } from "igniteui-react-core/ES2015/componentUtil";
/**
 * Represents an annotation layer that displays crosshair lines that cross through the closest value of the target series under the cursor.
*/
export class IgrCrosshairLayer extends IgrAnnotationLayer {
    createImplementation() {
        return new CrosshairLayer();
    }
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets or sets the color to use for the horizontal line. Leave null for an automatic value.
    */
    get horizontalLineStroke() {
        return brushToString(this.i.o1);
    }
    set horizontalLineStroke(v) {
        this.i.o1 = stringToBrush(v);
    }
    /**
     * Gets or sets the color to use for vertical line. Leave null for an automatic value.
    */
    get verticalLineStroke() {
        return brushToString(this.i.o2);
    }
    set verticalLineStroke(v) {
        this.i.o2 = stringToBrush(v);
    }
    /**
     * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
    */
    get targetSeries() {
        if (this.i.my == null) {
            return null;
        }
        return this.i.my.externalObject;
    }
    set targetSeries(v) {
        v == null ? this.i.my = null : this.i.my = v.i;
    }
    /**
     * Gets or sets whether to use value interpolation when drawing a line through the best value for the cursor position.
    */
    get useInterpolation() {
        return this.i.m3;
    }
    set useInterpolation(v) {
        this.i.m3 = ensureBool(v);
    }
    /**
     * Gets or sets whether to draw annotations over the axes where the crosshair meets with them.
    */
    get isAxisAnnotationEnabled() {
        return this.i.m1;
    }
    set isAxisAnnotationEnabled(v) {
        this.i.m1 = ensureBool(v);
    }
    /**
     * Gets or sets the color to use for the x axis annotation text. Leave unset for an automatic value.
    */
    get xAxisAnnotationTextColor() {
        return brushToString(this.i.o5);
    }
    set xAxisAnnotationTextColor(v) {
        this.i.o5 = stringToBrush(v);
    }
    /**
     * Gets or sets the color to use for the x axis annotation backing. Leave unset for an automatic value.
    */
    get xAxisAnnotationBackground() {
        return brushToString(this.i.o3);
    }
    set xAxisAnnotationBackground(v) {
        this.i.o3 = stringToBrush(v);
    }
    /**
     * Gets or sets the precision to use displaying values for interpolated crosshair positions.
    */
    get xAxisAnnotationInterpolatedValuePrecision() {
        return this.i.ng;
    }
    set xAxisAnnotationInterpolatedValuePrecision(v) {
        this.i.ng = +v;
    }
    /**
     * Gets or sets the color to use for the x axis annotation outline. Leave unset for an automatic value.
    */
    get xAxisAnnotationOutline() {
        return brushToString(this.i.o4);
    }
    set xAxisAnnotationOutline(v) {
        this.i.o4 = stringToBrush(v);
    }
    /**
     * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
    */
    get xAxisAnnotationPaddingLeft() {
        return this.i.m7;
    }
    set xAxisAnnotationPaddingLeft(v) {
        this.i.m7 = +v;
    }
    /**
     * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
    */
    get xAxisAnnotationPaddingTop() {
        return this.i.m9;
    }
    set xAxisAnnotationPaddingTop(v) {
        this.i.m9 = +v;
    }
    /**
     * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
    */
    get xAxisAnnotationPaddingRight() {
        return this.i.m8;
    }
    set xAxisAnnotationPaddingRight(v) {
        this.i.m8 = +v;
    }
    /**
     * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
    */
    get xAxisAnnotationPaddingBottom() {
        return this.i.m6;
    }
    set xAxisAnnotationPaddingBottom(v) {
        this.i.m6 = +v;
    }
    /**
     * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
    */
    get yAxisAnnotationPaddingLeft() {
        return this.i.nc;
    }
    set yAxisAnnotationPaddingLeft(v) {
        this.i.nc = +v;
    }
    /**
     * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
    */
    get yAxisAnnotationPaddingTop() {
        return this.i.ne;
    }
    set yAxisAnnotationPaddingTop(v) {
        this.i.ne = +v;
    }
    /**
     * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
    */
    get yAxisAnnotationPaddingRight() {
        return this.i.nd;
    }
    set yAxisAnnotationPaddingRight(v) {
        this.i.nd = +v;
    }
    /**
     * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
    */
    get yAxisAnnotationPaddingBottom() {
        return this.i.nb;
    }
    set yAxisAnnotationPaddingBottom(v) {
        this.i.nb = +v;
    }
    /**
     * Gets or sets the stroke thickness for the x axis annotation backing. Leave unset for an automatic value.
    */
    get xAxisAnnotationStrokeThickness() {
        return this.i.na;
    }
    set xAxisAnnotationStrokeThickness(v) {
        this.i.na = +v;
    }
    /**
     * Gets or sets the color to use for the y axis annotation text. Leave unset for an automatic value.
    */
    get yAxisAnnotationTextColor() {
        return brushToString(this.i.o8);
    }
    set yAxisAnnotationTextColor(v) {
        this.i.o8 = stringToBrush(v);
    }
    /**
     * Gets or sets the color to use for the y axis annotation backing. Leave unset for an automatic value.
    */
    get yAxisAnnotationBackground() {
        return brushToString(this.i.o6);
    }
    set yAxisAnnotationBackground(v) {
        this.i.o6 = stringToBrush(v);
    }
    /**
     * Gets or sets the precision to use displaying values for interpolated crosshair positions.
    */
    get yAxisAnnotationInterpolatedValuePrecision() {
        return this.i.nh;
    }
    set yAxisAnnotationInterpolatedValuePrecision(v) {
        this.i.nh = +v;
    }
    /**
     * Gets or sets the color to use for the y axis annotation outline. Leave unset for an automatic value.
    */
    get yAxisAnnotationOutline() {
        return brushToString(this.i.o7);
    }
    set yAxisAnnotationOutline(v) {
        this.i.o7 = stringToBrush(v);
    }
    /**
     * Gets or sets the stroke thickness for the y axis annotation backing. Leave unset for an automatic value.
    */
    get yAxisAnnotationStrokeThickness() {
        return this.i.nf;
    }
    set yAxisAnnotationStrokeThickness(v) {
        this.i.nf = +v;
    }
    /**
     * Gets or sets whether to display the vertical line.
    */
    get verticalLineVisibility() {
        return this.i.pc;
    }
    set verticalLineVisibility(v) {
        this.i.pc = ensureEnum(Visibility_$type, v);
    }
    /**
     * Gets or sets whether to display the horizontal line.
    */
    get horizontalLineVisibility() {
        return this.i.pb;
    }
    set horizontalLineVisibility(v) {
        this.i.pb = ensureEnum(Visibility_$type, v);
    }
    /**
     * Gets or sets whether to skip unknown values when searching for series values.
    */
    get skipUnknownValues() {
        return this.i.m2;
    }
    set skipUnknownValues(v) {
        this.i.m2 = ensureBool(v);
    }
}
