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, "targetSeriesName", {
        /**
         * Gets or sets the name of the series series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            return this.i.p0;
        },
        set: function (v) {
            this.i.p0 = v;
        },
        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.pg == null) {
                return null;
            }
            if (!this.i.pg.externalObject) {
                var e = IgrSeries._createFromInternal(this.i.pg);
                if (e) {
                    e._implementation = this.i.pg;
                }
                this.i.pg.externalObject = e;
            }
            return this.i.pg.externalObject;
        },
        set: function (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;
        },
        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.pf;
        },
        set: function (v) {
            this.i.pf = 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.qj);
        },
        set: function (v) {
            this.i.qj = 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.qh);
        },
        set: function (v) {
            this.i.qh = 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.pp;
        },
        set: function (v) {
            this.i.pp = +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.qi);
        },
        set: function (v) {
            this.i.qi = 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.pl;
        },
        set: function (v) {
            this.i.pl = +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.pn;
        },
        set: function (v) {
            this.i.pn = +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.pm;
        },
        set: function (v) {
            this.i.pm = +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.pk;
        },
        set: function (v) {
            this.i.pk = +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.po;
        },
        set: function (v) {
            this.i.po = +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
