import { IgrSeries } from "./igr-series";
import { FinalValueSelectionMode_$type } from "./FinalValueSelectionMode";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { FinalValueLayer } from "./FinalValueLayer";
import { ensureEnum, brushToString, stringToBrush } from "igniteui-react-core";
/**
 * Represents an annotation layer that displays crosshair lines that cross through the closest value of the target series under the cursor.
*/
export class IgrFinalValueLayer extends IgrAnnotationLayer {
    createImplementation() {
        return new FinalValueLayer();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets or sets the name of the series series to target this annotation to. If null, this annotation targets all series simultaneously.
    */
    get targetSeriesName() {
        return this.i.p0;
    }
    set targetSeriesName(v) {
        this.i.p0 = v;
    }
    /**
     * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
    */
    get targetSeries() {
        if (this.i.pg == null) {
            return null;
        }
        if (!this.i.pg.externalObject) {
            let e = IgrSeries._createFromInternal(this.i.pg);
            if (e) {
                e._implementation = this.i.pg;
            }
            this.i.pg.externalObject = e;
        }
        return this.i.pg.externalObject;
    }
    set targetSeries(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.pg = null : this.i.pg = v.i;
    }
    /**
     * Gets or sets how to select the final value to annotate.
    */
    get finalValueSelectionMode() {
        return this.i.pf;
    }
    set finalValueSelectionMode(v) {
        this.i.pf = ensureEnum(FinalValueSelectionMode_$type, v);
    }
    /**
     * Gets or sets the color to use for the axis annotation text. Leave unset for an automatic value.
    */
    get axisAnnotationTextColor() {
        return brushToString(this.i.qj);
    }
    set axisAnnotationTextColor(v) {
        this.i.qj = stringToBrush(v);
    }
    /**
     * Gets or sets the color to use for the axis annotation backing. Leave unset for an automatic value.
    */
    get axisAnnotationBackground() {
        return brushToString(this.i.qh);
    }
    set axisAnnotationBackground(v) {
        this.i.qh = stringToBrush(v);
    }
    /**
     * Gets or sets the precision to use displaying values for interpolated crosshair positions.
    */
    get axisAnnotationInterpolatedValuePrecision() {
        return this.i.pp;
    }
    set axisAnnotationInterpolatedValuePrecision(v) {
        this.i.pp = +v;
    }
    /**
     * Gets or sets the color to use for the axis annotation outline. Leave unset for an automatic value.
    */
    get axisAnnotationOutline() {
        return brushToString(this.i.qi);
    }
    set axisAnnotationOutline(v) {
        this.i.qi = stringToBrush(v);
    }
    /**
     * Gets or sets the left padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins.
    */
    get axisAnnotationPaddingLeft() {
        return this.i.pl;
    }
    set axisAnnotationPaddingLeft(v) {
        this.i.pl = +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 axisAnnotationPaddingTop() {
        return this.i.pn;
    }
    set axisAnnotationPaddingTop(v) {
        this.i.pn = +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 axisAnnotationPaddingRight() {
        return this.i.pm;
    }
    set axisAnnotationPaddingRight(v) {
        this.i.pm = +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 axisAnnotationPaddingBottom() {
        return this.i.pk;
    }
    set axisAnnotationPaddingBottom(v) {
        this.i.pk = +v;
    }
    /**
     * Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
    */
    get axisAnnotationStrokeThickness() {
        return this.i.po;
    }
    set axisAnnotationStrokeThickness(v) {
        this.i.po = +v;
    }
    findByName(name) {
        var baseResult = super.findByName(name);
        if (baseResult) {
            return baseResult;
        }
        if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
            return this.targetSeries;
        }
        return null;
    }
    _styling(container, component, parent) {
        super._styling(container, component, parent);
        this._inStyling = true;
        if (this.targetSeries && this.targetSeries._styling) {
            this.targetSeries._styling(container, component, this);
        }
        this._inStyling = false;
    }
}
//# sourceMappingURL=igr-final-value-layer.js.map
