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.
*/
export let IgxFinalValueLayerComponent = /*@__PURE__*/ (() => {
    class IgxFinalValueLayerComponent extends IgxAnnotationLayerComponent {
        constructor() {
            super();
        }
        createImplementation() {
            return new FinalValueLayer();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets whether the series is final value annotation layer.
        */
        get isAnnotationFinalValue() {
            return this.i.da;
        }
        /**
         * Gets or sets the name of the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get targetSeriesName() {
            return this.i.rw;
        }
        set targetSeriesName(v) {
            this.i.rw = v;
        }
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get targetSeries() {
            if (this.i.ra == null) {
                return null;
            }
            if (!this.i.ra.externalObject) {
                let e = IgxSeriesComponent._createFromInternal(this.i.ra);
                if (e) {
                    e._implementation = this.i.ra;
                }
                this.i.ra.externalObject = e;
            }
            return this.i.ra.externalObject;
        }
        set targetSeries(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;
        }
        /**
         * Gets or sets how to select the final value to annotate.
        */
        get finalValueSelectionMode() {
            return this.i.q9;
        }
        set finalValueSelectionMode(v) {
            this.i.q9 = ensureEnum(FinalValueSelectionMode_$type, v);
        }
        /**
         * Gets or sets the color to use for the axis annotation text. Leave unset for an automatic value.
        */
        get axisAnnotationTextColor() {
            return brushToString(this.i.sg);
        }
        set axisAnnotationTextColor(v) {
            this.i.sg = stringToBrush(v);
        }
        /**
         * Gets or sets the color to use for the axis annotation backing. Leave unset for an automatic value.
        */
        get axisAnnotationBackground() {
            return brushToString(this.i.se);
        }
        set axisAnnotationBackground(v) {
            this.i.se = stringToBrush(v);
        }
        /**
         * Gets or sets the corner radius to use for the axis annotation backing. Leave unset for an automatic value.
        */
        get axisAnnotationBackgroundCornerRadius() {
            return this.i.re;
        }
        set axisAnnotationBackgroundCornerRadius(v) {
            this.i.re = +v;
        }
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get axisAnnotationInterpolatedValuePrecision() {
            return this.i.rk;
        }
        set axisAnnotationInterpolatedValuePrecision(v) {
            this.i.rk = +v;
        }
        /**
         * Gets or sets the color to use for the axis annotation outline. Leave unset for an automatic value.
        */
        get axisAnnotationOutline() {
            return brushToString(this.i.sf);
        }
        set axisAnnotationOutline(v) {
            this.i.sf = stringToBrush(v);
        }
        /**
         * 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 axisAnnotationPaddingLeft() {
            return this.i.rg;
        }
        set axisAnnotationPaddingLeft(v) {
            this.i.rg = +v;
        }
        /**
         * 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 axisAnnotationPaddingTop() {
            return this.i.ri;
        }
        set axisAnnotationPaddingTop(v) {
            this.i.ri = +v;
        }
        /**
         * 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 axisAnnotationPaddingRight() {
            return this.i.rh;
        }
        set axisAnnotationPaddingRight(v) {
            this.i.rh = +v;
        }
        /**
         * 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 axisAnnotationPaddingBottom() {
            return this.i.rf;
        }
        set axisAnnotationPaddingBottom(v) {
            this.i.rf = +v;
        }
        /**
         * Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
        */
        get axisAnnotationStrokeThickness() {
            return this.i.rj;
        }
        set axisAnnotationStrokeThickness(v) {
            this.i.rj = +v;
        }
        findByName(name) {
            var baseResult = super.findByName(name);
            if (baseResult) {
                return baseResult;
            }
            if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
                return this.targetSeries;
            }
            return null;
        }
        _styling(container, component, parent) {
            super._styling(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(() => IgxFinalValueLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxFinalValueLayerComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return 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(() => IgxFinalValueLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => 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
            }] } });
