import { __extends } from "tslib";
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.
*/
var IgrFinalValueLayer = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgrFinalValueLayer, _super);
    function IgrFinalValueLayer(props) {
        return _super.call(this, props) || this;
    }
    IgrFinalValueLayer.prototype.createImplementation = function () {
        return new FinalValueLayer();
    };
    Object.defineProperty(IgrFinalValueLayer.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "isAnnotationFinalValue", {
        /**
         * Gets whether the series is final value annotation layer.
        */
        get: function () {
            return this.i.eq;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "targetSeriesName", {
        /**
         * Gets or sets the name of the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            return this.i.aak;
        },
        set: function (v) {
            this.i.aak = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "targetSeries", {
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            var r = this.i.zy;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgrSeries._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.zy = null : this.i.zy = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "finalValueSelectionMode", {
        /**
         * Gets or sets how to select the final value to annotate.
        */
        get: function () {
            return this.i.zx;
        },
        set: function (v) {
            this.i.zx = ensureEnum(FinalValueSelectionMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationTextColor", {
        /**
         * Gets or sets the color to use for the axis annotation text. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.aa4);
        },
        set: function (v) {
            this.i.aa4 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationBackground", {
        /**
         * Gets or sets the color to use for the axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.aa2);
        },
        set: function (v) {
            this.i.aa2 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationBackgroundCornerRadius", {
        /**
         * Gets or sets the corner radius to use for the axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.z2;
        },
        set: function (v) {
            this.i.z2 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationInterpolatedValuePrecision", {
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get: function () {
            return this.i.z8;
        },
        set: function (v) {
            this.i.z8 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationOutline", {
        /**
         * Gets or sets the color to use for the axis annotation outline. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.aa3);
        },
        set: function (v) {
            this.i.aa3 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationPaddingLeft", {
        /**
         * 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: function () {
            return this.i.z4;
        },
        set: function (v) {
            this.i.z4 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationPaddingTop", {
        /**
         * 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: function () {
            return this.i.z6;
        },
        set: function (v) {
            this.i.z6 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationPaddingRight", {
        /**
         * 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: function () {
            return this.i.z5;
        },
        set: function (v) {
            this.i.z5 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationPaddingBottom", {
        /**
         * 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: function () {
            return this.i.z3;
        },
        set: function (v) {
            this.i.z3 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "axisAnnotationStrokeThickness", {
        /**
         * Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.z7;
        },
        set: function (v) {
            this.i.z7 = +v;
        },
        enumerable: false,
        configurable: true
    });
    IgrFinalValueLayer.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
            return this.targetSeries;
        }
        return null;
    };
    IgrFinalValueLayer.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.targetSeries && this.targetSeries._styling) {
            this.targetSeries._styling(container, component, this);
        }
        this._inStyling = false;
    };
    return IgrFinalValueLayer;
}(IgrAnnotationLayer));
export { IgrFinalValueLayer };
