import * as tslib_1 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) {
    tslib_1.__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: true,
        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 () {
            if (this.i.nh == null) {
                return null;
            }
            if (!this.i.nh.externalObject) {
                var e = IgrSeries._createFromInternal(this.i.nh);
                if (e) {
                    e._implementation = this.i.nh;
                }
                this.i.nh.externalObject = e;
            }
            return this.i.nh.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.nh = null : this.i.nh = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrFinalValueLayer.prototype, "finalValueSelectionMode", {
        /**
         * Gets or sets how to select the final value to annotate.
        */
        get: function () {
            return this.i.ng;
        },
        set: function (v) {
            this.i.ng = ensureEnum(FinalValueSelectionMode_$type, v);
        },
        enumerable: true,
        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.oh);
        },
        set: function (v) {
            this.i.oh = stringToBrush(v);
        },
        enumerable: true,
        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.of);
        },
        set: function (v) {
            this.i.of = stringToBrush(v);
        },
        enumerable: true,
        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.nq;
        },
        set: function (v) {
            this.i.nq = +v;
        },
        enumerable: true,
        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.og);
        },
        set: function (v) {
            this.i.og = stringToBrush(v);
        },
        enumerable: true,
        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.nm;
        },
        set: function (v) {
            this.i.nm = +v;
        },
        enumerable: true,
        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.no;
        },
        set: function (v) {
            this.i.no = +v;
        },
        enumerable: true,
        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.nn;
        },
        set: function (v) {
            this.i.nn = +v;
        },
        enumerable: true,
        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.nl;
        },
        set: function (v) {
            this.i.nl = +v;
        },
        enumerable: true,
        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.np;
        },
        set: function (v) {
            this.i.np = +v;
        },
        enumerable: true,
        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 };
//# sourceMappingURL=igr-final-value-layer.js.map
