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.oa);
    }
    set horizontalLineStroke(v) {
        this.i.oa = stringToBrush(v);
    }
    /**
     * Gets or sets the color to use for vertical line. Leave null for an automatic value.
    */
    get verticalLineStroke() {
        return brushToString(this.i.ob);
    }
    set verticalLineStroke(v) {
        this.i.ob = 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.mr == null) {
            return null;
        }
        return this.i.mr.externalObject;
    }
    set targetSeries(v) {
        v == null ? this.i.mr = null : this.i.mr = 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.mu;
    }
    set useInterpolation(v) {
        this.i.mu = ensureBool(v);
    }
    /**
     * Gets or sets whether to use value interpolation when drawing a line through the best value for the cursor position.
    */
    get isAxisAnnotationEnabled() {
        return this.i.ms;
    }
    set isAxisAnnotationEnabled(v) {
        this.i.ms = 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.oe);
    }
    set xAxisAnnotationTextColor(v) {
        this.i.oe = 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.oc);
    }
    set xAxisAnnotationBackground(v) {
        this.i.oc = stringToBrush(v);
    }
    /**
     * Gets or sets the precision to use displaying values for interpolated crosshair positions.
    */
    get xAxisAnnotationInterpolatedValuePrecision() {
        return this.i.m1;
    }
    set xAxisAnnotationInterpolatedValuePrecision(v) {
        this.i.m1 = +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.od);
    }
    set xAxisAnnotationOutline(v) {
        this.i.od = stringToBrush(v);
    }
    /**
     * Gets or sets the padding for the x axis annotation backing. Leave unset for an automatic value.
    */
    get xAxisAnnotationPadding() {
        return this.i.mx;
    }
    set xAxisAnnotationPadding(v) {
        this.i.mx = +v;
    }
    /**
     * Gets or sets the stroke thickness for the x axis annotation backing. Leave unset for an automatic value.
    */
    get xAxisAnnotationStrokeThickness() {
        return this.i.my;
    }
    set xAxisAnnotationStrokeThickness(v) {
        this.i.my = +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.oh);
    }
    set yAxisAnnotationTextColor(v) {
        this.i.oh = 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.of);
    }
    set yAxisAnnotationBackground(v) {
        this.i.of = stringToBrush(v);
    }
    /**
     * Gets or sets the precision to use displaying values for interpolated crosshair positions.
    */
    get yAxisAnnotationInterpolatedValuePrecision() {
        return this.i.m2;
    }
    set yAxisAnnotationInterpolatedValuePrecision(v) {
        this.i.m2 = +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.og);
    }
    set yAxisAnnotationOutline(v) {
        this.i.og = stringToBrush(v);
    }
    /**
     * Gets or sets the padding for the y axis annotation backing. Leave unset for an automatic value.
    */
    get yAxisAnnotationPadding() {
        return this.i.mz;
    }
    set yAxisAnnotationPadding(v) {
        this.i.mz = +v;
    }
    /**
     * Gets or sets the stroke thickness for the y axis annotation backing. Leave unset for an automatic value.
    */
    get yAxisAnnotationStrokeThickness() {
        return this.i.m0;
    }
    set yAxisAnnotationStrokeThickness(v) {
        this.i.m0 = +v;
    }
    /**
     * Gets or sets whether to display the vertical line.
    */
    get verticalLineVisibility() {
        return this.i.oj;
    }
    set verticalLineVisibility(v) {
        this.i.oj = ensureEnum(Visibility_$type, v);
    }
    /**
     * Gets or sets whether to display the horizontal line.
    */
    get horizontalLineVisibility() {
        return this.i.oi;
    }
    set horizontalLineVisibility(v) {
        this.i.oi = ensureEnum(Visibility_$type, v);
    }
    /**
     * Gets or sets whether to skip unknown values when searching for series values.
    */
    get skipUnknownValues() {
        return this.i.mt;
    }
    set skipUnknownValues(v) {
        this.i.mt = ensureBool(v);
    }
}
