import { __extends } from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxSeriesComponent } from "./igx-series-component";
import { FinalValueSelectionMode_$type } from "./FinalValueSelectionMode";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { FinalValueLayer } from "./FinalValueLayer";
import { ensureEnum, brushToString, stringToBrush } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents an annotation layer that displays crosshair lines that cross through the closest value of the target series under the cursor.
*/
var IgxFinalValueLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxFinalValueLayerComponent, _super);
    function IgxFinalValueLayerComponent() {
        return _super.call(this) || this;
    }
    IgxFinalValueLayerComponent.prototype.createImplementation = function () {
        return new FinalValueLayer();
    };
    Object.defineProperty(IgxFinalValueLayerComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.prototype, "isAnnotationFinalValue", {
        /**
         * Gets whether the series is final value annotation layer.
        */
        get: function () {
            return this.i.da;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.rw;
        },
        set: function (v) {
            this.i.rw = v;
        },
        enumerable: false,
        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.ra == null) {
                return null;
            }
            if (!this.i.ra.externalObject) {
                var e = IgxSeriesComponent._createFromInternal(this.i.ra);
                if (e) {
                    e._implementation = this.i.ra;
                }
                this.i.ra.externalObject = e;
            }
            return this.i.ra.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.ra = null : this.i.ra = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.prototype, "finalValueSelectionMode", {
        /**
         * Gets or sets how to select the final value to annotate.
        */
        get: function () {
            return this.i.q9;
        },
        set: function (v) {
            this.i.q9 = ensureEnum(FinalValueSelectionMode_$type, v);
        },
        enumerable: false,
        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.sg);
        },
        set: function (v) {
            this.i.sg = stringToBrush(v);
        },
        enumerable: false,
        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.se);
        },
        set: function (v) {
            this.i.se = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxFinalValueLayerComponent.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.re;
        },
        set: function (v) {
            this.i.re = +v;
        },
        enumerable: false,
        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.rk;
        },
        set: function (v) {
            this.i.rk = +v;
        },
        enumerable: false,
        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.sf);
        },
        set: function (v) {
            this.i.sf = stringToBrush(v);
        },
        enumerable: false,
        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.rg;
        },
        set: function (v) {
            this.i.rg = +v;
        },
        enumerable: false,
        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.ri;
        },
        set: function (v) {
            this.i.ri = +v;
        },
        enumerable: false,
        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.rh;
        },
        set: function (v) {
            this.i.rh = +v;
        },
        enumerable: false,
        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.rf;
        },
        set: function (v) {
            this.i.rf = +v;
        },
        enumerable: false,
        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.rj;
        },
        set: function (v) {
            this.i.rj = +v;
        },
        enumerable: false,
        configurable: true
    });
    IgxFinalValueLayerComponent.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;
    };
    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;
    };
    IgxFinalValueLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxFinalValueLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxFinalValueLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxFinalValueLayerComponent, selector: "igx-final-value-layer", inputs: { targetSeriesName: "targetSeriesName", targetSeries: "targetSeries", finalValueSelectionMode: "finalValueSelectionMode", axisAnnotationTextColor: "axisAnnotationTextColor", axisAnnotationBackground: "axisAnnotationBackground", axisAnnotationBackgroundCornerRadius: "axisAnnotationBackgroundCornerRadius", axisAnnotationInterpolatedValuePrecision: "axisAnnotationInterpolatedValuePrecision", axisAnnotationOutline: "axisAnnotationOutline", axisAnnotationPaddingLeft: "axisAnnotationPaddingLeft", axisAnnotationPaddingTop: "axisAnnotationPaddingTop", axisAnnotationPaddingRight: "axisAnnotationPaddingRight", axisAnnotationPaddingBottom: "axisAnnotationPaddingBottom", axisAnnotationStrokeThickness: "axisAnnotationStrokeThickness" }, providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxFinalValueLayerComponent;
}(IgxAnnotationLayerComponent));
export { IgxFinalValueLayerComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxFinalValueLayerComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-final-value-layer',
                    template: "",
                    providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { targetSeriesName: [{
                type: Input
            }], targetSeries: [{
                type: Input
            }], finalValueSelectionMode: [{
                type: Input
            }], axisAnnotationTextColor: [{
                type: Input
            }], axisAnnotationBackground: [{
                type: Input
            }], axisAnnotationBackgroundCornerRadius: [{
                type: Input
            }], axisAnnotationInterpolatedValuePrecision: [{
                type: Input
            }], axisAnnotationOutline: [{
                type: Input
            }], axisAnnotationPaddingLeft: [{
                type: Input
            }], axisAnnotationPaddingTop: [{
                type: Input
            }], axisAnnotationPaddingRight: [{
                type: Input
            }], axisAnnotationPaddingBottom: [{
                type: Input
            }], axisAnnotationStrokeThickness: [{
                type: Input
            }] } });
