import * as tslib_1 from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxSeriesComponent } from "./igx-series-component";
import { FinalValueSelectionMode, FinalValueSelectionMode_$type } from "./FinalValueSelectionMode";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { FinalValueLayer } from "./FinalValueLayer";
import { ensureEnum, brushToString, stringToBrush } from "igniteui-angular-core";
/**
 * Represents an annotation layer that displays crosshair lines that cross through the closest value of the target series under the cursor.
*/
export var IgxFinalValueLayerComponent_PROVIDERS = [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }];
var IgxFinalValueLayerComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxFinalValueLayerComponent, _super);
    function IgxFinalValueLayerComponent() {
        return _super.call(this) || this;
    }
    IgxFinalValueLayerComponent_1 = IgxFinalValueLayerComponent;
    IgxFinalValueLayerComponent.prototype.createImplementation = function () {
        return new FinalValueLayer();
    };
    Object.defineProperty(IgxFinalValueLayerComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.m7 == null) {
                return null;
            }
            if (!this.i.m7.externalObject) {
                var e = IgxSeriesComponent._createFromInternal(this.i.m7);
                if (e) {
                    e._implementation = this.i.m7;
                }
                this.i.m7.externalObject = e;
            }
            return this.i.m7.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.m7 = null : this.i.m7 = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.prototype, "finalValueSelectionMode", {
        /**
         * Gets or sets how to select the final value to annotate.
        */
        get: function () {
            return this.i.m6;
        },
        set: function (v) {
            this.i.m6 = ensureEnum(FinalValueSelectionMode_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.n7);
        },
        set: function (v) {
            this.i.n7 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.n5);
        },
        set: function (v) {
            this.i.n5 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationInterpolatedValuePrecision", {
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get: function () {
            return this.i.ng;
        },
        set: function (v) {
            this.i.ng = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.n6);
        },
        set: function (v) {
            this.i.n6 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.nc;
        },
        set: function (v) {
            this.i.nc = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.ne;
        },
        set: function (v) {
            this.i.ne = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.nd;
        },
        set: function (v) {
            this.i.nd = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.nb;
        },
        set: function (v) {
            this.i.nb = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationStrokeThickness", {
        /**
         * Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.nf;
        },
        set: function (v) {
            this.i.nf = +v;
        },
        enumerable: true,
        configurable: true
    });
    IgxFinalValueLayerComponent.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;
    };
    var IgxFinalValueLayerComponent_1;
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxSeriesComponent),
        tslib_1.__metadata("design:paramtypes", [IgxSeriesComponent])
    ], IgxFinalValueLayerComponent.prototype, "targetSeries", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxFinalValueLayerComponent.prototype, "finalValueSelectionMode", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxFinalValueLayerComponent.prototype, "axisAnnotationTextColor", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxFinalValueLayerComponent.prototype, "axisAnnotationBackground", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxFinalValueLayerComponent.prototype, "axisAnnotationInterpolatedValuePrecision", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxFinalValueLayerComponent.prototype, "axisAnnotationOutline", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxFinalValueLayerComponent.prototype, "axisAnnotationPaddingLeft", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxFinalValueLayerComponent.prototype, "axisAnnotationPaddingTop", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxFinalValueLayerComponent.prototype, "axisAnnotationPaddingRight", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxFinalValueLayerComponent.prototype, "axisAnnotationPaddingBottom", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxFinalValueLayerComponent.prototype, "axisAnnotationStrokeThickness", null);
    IgxFinalValueLayerComponent = IgxFinalValueLayerComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-final-value-layer',
            template: "",
            providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent_1; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent_1; }) }],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxFinalValueLayerComponent);
    return IgxFinalValueLayerComponent;
}(IgxAnnotationLayerComponent));
export { IgxFinalValueLayerComponent };
//# sourceMappingURL=igx-final-value-layer-component.js.map