import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { ValueLayerValueMode_$type } from "./ValueLayerValueMode";
import { IgxSeriesComponent } from "./igx-series-component";
import { IgxAxisComponent } from "./igx-axis-component";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { ValueLayer } from "./ValueLayer";
import { ensureBool, ensureEnum, brushToString, stringToBrush, toPoint } 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 IgxValueLayerComponent = /*@__PURE__*/ (() => {
    class IgxValueLayerComponent extends IgxAnnotationLayerComponent {
        constructor() {
            super();
        }
        createImplementation() {
            return new ValueLayer();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets whether the series is an crosshair annotation layer.
        */
        get isAnnotationValueLayer() {
            return this.i.et;
        }
        /**
         * Gets or sets the value mode for the overlay.
        */
        get valueMode() {
            return this.i.z3;
        }
        set valueMode(v) {
            this.i.z3 = ensureEnum(ValueLayerValueMode_$type, v);
        }
        /**
         * Gets or sets the color to use for the horizontal line. Leave null for an automatic value.
        */
        get horizontalLineStroke() {
            return brushToString(this.i.acs);
        }
        set horizontalLineStroke(v) {
            this.i.acs = stringToBrush(v);
        }
        /**
         * Gets or sets the color to use for vertical line. Leave null for an automatic value.
        */
        get verticalLineStroke() {
            return brushToString(this.i.act);
        }
        set verticalLineStroke(v) {
            this.i.act = stringToBrush(v);
        }
        /**
         * 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.aaw;
        }
        set targetSeriesName(v) {
            this.i.aaw = v;
        }
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get targetSeries() {
            const r = this.i.z1;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxSeriesComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        set targetSeries(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.z1 = null : this.i.z1 = v.i;
        }
        /**
         * Gets or sets the name of the axis to target this annotation to. If null, this annotation targets all axis simultaneously.
        */
        get targetAxisName() {
            return this.i.aat;
        }
        set targetAxisName(v) {
            this.i.aat = v;
        }
        /**
         * Gets or sets the axis to target this annotation to. If null, this annotation targets all value axis simultaneously.
        */
        get targetAxis() {
            const r = this.i.zw;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        set targetAxis(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.zw = null : this.i.zw = v.i;
        }
        /**
         * Gets or sets whether to use value interpolation when drawing a line through the best value for the cursor position.
        */
        get useInterpolation() {
            return this.i.z8;
        }
        set useInterpolation(v) {
            this.i.z8 = ensureBool(v);
        }
        /**
         * Gets or sets whether to draw annotations over the axes where the crosshair meets with them.
        */
        get isAxisAnnotationEnabled() {
            return this.i.z5;
        }
        set isAxisAnnotationEnabled(v) {
            this.i.z5 = ensureBool(v);
        }
        /**
         * Sets or gets a function which takes an object that produces a formatted label for the x axis annotation.
        */
        get xAxisAnnotationFormatLabel() {
            return this.i.zx;
        }
        set xAxisAnnotationFormatLabel(v) {
            this.i.zx = v;
        }
        /**
         * Sets or gets a function which takes an object that produces a formatted label for the y axis annotation.
        */
        get yAxisAnnotationFormatLabel() {
            return this.i.zy;
        }
        set yAxisAnnotationFormatLabel(v) {
            this.i.zy = v;
        }
        /**
         * Gets or sets the color to use for the x axis annotation text. Leave unset for an automatic value.
        */
        get xAxisAnnotationTextColor() {
            return brushToString(this.i.acw);
        }
        set xAxisAnnotationTextColor(v) {
            this.i.acw = stringToBrush(v);
        }
        /**
         * Gets or sets the color to use for the x axis annotation backing. Leave unset for an automatic value.
        */
        get xAxisAnnotationBackground() {
            return brushToString(this.i.acu);
        }
        set xAxisAnnotationBackground(v) {
            this.i.acu = stringToBrush(v);
        }
        /**
         * Gets or sets the corner radius to use for the x axis annotation backing. Leave unset for an automatic value.
        */
        get xAxisAnnotationBackgroundCornerRadius() {
            return this.i.aab;
        }
        set xAxisAnnotationBackgroundCornerRadius(v) {
            this.i.aab = +v;
        }
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get xAxisAnnotationInterpolatedValuePrecision() {
            return this.i.aan;
        }
        set xAxisAnnotationInterpolatedValuePrecision(v) {
            this.i.aan = +v;
        }
        /**
         * Gets or sets the color to use for the x axis annotation outline. Leave unset for an automatic value.
        */
        get xAxisAnnotationOutline() {
            return brushToString(this.i.acv);
        }
        set xAxisAnnotationOutline(v) {
            this.i.acv = stringToBrush(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 xAxisAnnotationPaddingLeft() {
            return this.i.aad;
        }
        set xAxisAnnotationPaddingLeft(v) {
            this.i.aad = +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 xAxisAnnotationPaddingTop() {
            return this.i.aaf;
        }
        set xAxisAnnotationPaddingTop(v) {
            this.i.aaf = +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 xAxisAnnotationPaddingRight() {
            return this.i.aae;
        }
        set xAxisAnnotationPaddingRight(v) {
            this.i.aae = +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 xAxisAnnotationPaddingBottom() {
            return this.i.aac;
        }
        set xAxisAnnotationPaddingBottom(v) {
            this.i.aac = +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 yAxisAnnotationPaddingLeft() {
            return this.i.aaj;
        }
        set yAxisAnnotationPaddingLeft(v) {
            this.i.aaj = +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 yAxisAnnotationPaddingTop() {
            return this.i.aal;
        }
        set yAxisAnnotationPaddingTop(v) {
            this.i.aal = +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 yAxisAnnotationPaddingRight() {
            return this.i.aak;
        }
        set yAxisAnnotationPaddingRight(v) {
            this.i.aak = +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 yAxisAnnotationPaddingBottom() {
            return this.i.aai;
        }
        set yAxisAnnotationPaddingBottom(v) {
            this.i.aai = +v;
        }
        /**
         * Gets or sets the stroke thickness for the x axis annotation backing. Leave unset for an automatic value.
        */
        get xAxisAnnotationStrokeThickness() {
            return this.i.aag;
        }
        set xAxisAnnotationStrokeThickness(v) {
            this.i.aag = +v;
        }
        /**
         * Gets or sets the color to use for the y axis annotation text. Leave unset for an automatic value.
        */
        get yAxisAnnotationTextColor() {
            return brushToString(this.i.acz);
        }
        set yAxisAnnotationTextColor(v) {
            this.i.acz = stringToBrush(v);
        }
        /**
         * Gets or sets the color to use for the y axis annotation backing. Leave unset for an automatic value.
        */
        get yAxisAnnotationBackground() {
            return brushToString(this.i.acx);
        }
        set yAxisAnnotationBackground(v) {
            this.i.acx = stringToBrush(v);
        }
        /**
         * Gets or sets the corner radius to use for the y axis annotation backing. Leave unset for an automatic value.
        */
        get yAxisAnnotationBackgroundCornerRadius() {
            return this.i.aah;
        }
        set yAxisAnnotationBackgroundCornerRadius(v) {
            this.i.aah = +v;
        }
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get yAxisAnnotationInterpolatedValuePrecision() {
            return this.i.aao;
        }
        set yAxisAnnotationInterpolatedValuePrecision(v) {
            this.i.aao = +v;
        }
        /**
         * Gets or sets the color to use for the y axis annotation outline. Leave unset for an automatic value.
        */
        get yAxisAnnotationOutline() {
            return brushToString(this.i.acy);
        }
        set yAxisAnnotationOutline(v) {
            this.i.acy = stringToBrush(v);
        }
        /**
         * Gets or sets the stroke thickness for the y axis annotation backing. Leave unset for an automatic value.
        */
        get yAxisAnnotationStrokeThickness() {
            return this.i.aam;
        }
        set yAxisAnnotationStrokeThickness(v) {
            this.i.aam = +v;
        }
        /**
         * Gets or sets whether to skip unknown values when searching for series values.
        */
        get skipUnknownValues() {
            return this.i.z7;
        }
        set skipUnknownValues(v) {
            this.i.z7 = ensureBool(v);
        }
        get isSummarizationSupported() {
            return this.i.isSummarizationSupported;
        }
        findByName(name) {
            var baseResult = super.findByName(name);
            if (baseResult) {
                return baseResult;
            }
            if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) {
                return this.targetSeries;
            }
            if (this.targetAxis && this.targetAxis.name && this.targetAxis.name == name) {
                return this.targetAxis;
            }
            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);
            }
            if (this.targetAxis && this.targetAxis._styling) {
                this.targetAxis._styling(container, component, this);
            }
            this._inStyling = false;
        }
        getSeriesValue(world, useInterpolation, skipUnknowns) {
            let iv = this.i.i5(toPoint(world), useInterpolation, skipUnknowns);
            return (iv);
        }
    }
    IgxValueLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxValueLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxValueLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxValueLayerComponent, selector: "igx-value-layer", inputs: { valueMode: "valueMode", horizontalLineStroke: "horizontalLineStroke", verticalLineStroke: "verticalLineStroke", targetSeriesName: "targetSeriesName", targetSeries: "targetSeries", targetAxisName: "targetAxisName", targetAxis: "targetAxis", useInterpolation: "useInterpolation", isAxisAnnotationEnabled: "isAxisAnnotationEnabled", xAxisAnnotationFormatLabel: "xAxisAnnotationFormatLabel", yAxisAnnotationFormatLabel: "yAxisAnnotationFormatLabel", xAxisAnnotationTextColor: "xAxisAnnotationTextColor", xAxisAnnotationBackground: "xAxisAnnotationBackground", xAxisAnnotationBackgroundCornerRadius: "xAxisAnnotationBackgroundCornerRadius", xAxisAnnotationInterpolatedValuePrecision: "xAxisAnnotationInterpolatedValuePrecision", xAxisAnnotationOutline: "xAxisAnnotationOutline", xAxisAnnotationPaddingLeft: "xAxisAnnotationPaddingLeft", xAxisAnnotationPaddingTop: "xAxisAnnotationPaddingTop", xAxisAnnotationPaddingRight: "xAxisAnnotationPaddingRight", xAxisAnnotationPaddingBottom: "xAxisAnnotationPaddingBottom", yAxisAnnotationPaddingLeft: "yAxisAnnotationPaddingLeft", yAxisAnnotationPaddingTop: "yAxisAnnotationPaddingTop", yAxisAnnotationPaddingRight: "yAxisAnnotationPaddingRight", yAxisAnnotationPaddingBottom: "yAxisAnnotationPaddingBottom", xAxisAnnotationStrokeThickness: "xAxisAnnotationStrokeThickness", yAxisAnnotationTextColor: "yAxisAnnotationTextColor", yAxisAnnotationBackground: "yAxisAnnotationBackground", yAxisAnnotationBackgroundCornerRadius: "yAxisAnnotationBackgroundCornerRadius", yAxisAnnotationInterpolatedValuePrecision: "yAxisAnnotationInterpolatedValuePrecision", yAxisAnnotationOutline: "yAxisAnnotationOutline", yAxisAnnotationStrokeThickness: "yAxisAnnotationStrokeThickness", skipUnknownValues: "skipUnknownValues" }, providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxValueLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxValueLayerComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxValueLayerComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxValueLayerComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-value-layer',
                    template: ``,
                    providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxValueLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxValueLayerComponent) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { valueMode: [{
                type: Input
            }], horizontalLineStroke: [{
                type: Input
            }], verticalLineStroke: [{
                type: Input
            }], targetSeriesName: [{
                type: Input
            }], targetSeries: [{
                type: Input
            }], targetAxisName: [{
                type: Input
            }], targetAxis: [{
                type: Input
            }], useInterpolation: [{
                type: Input
            }], isAxisAnnotationEnabled: [{
                type: Input
            }], xAxisAnnotationFormatLabel: [{
                type: Input
            }], yAxisAnnotationFormatLabel: [{
                type: Input
            }], xAxisAnnotationTextColor: [{
                type: Input
            }], xAxisAnnotationBackground: [{
                type: Input
            }], xAxisAnnotationBackgroundCornerRadius: [{
                type: Input
            }], xAxisAnnotationInterpolatedValuePrecision: [{
                type: Input
            }], xAxisAnnotationOutline: [{
                type: Input
            }], xAxisAnnotationPaddingLeft: [{
                type: Input
            }], xAxisAnnotationPaddingTop: [{
                type: Input
            }], xAxisAnnotationPaddingRight: [{
                type: Input
            }], xAxisAnnotationPaddingBottom: [{
                type: Input
            }], yAxisAnnotationPaddingLeft: [{
                type: Input
            }], yAxisAnnotationPaddingTop: [{
                type: Input
            }], yAxisAnnotationPaddingRight: [{
                type: Input
            }], yAxisAnnotationPaddingBottom: [{
                type: Input
            }], xAxisAnnotationStrokeThickness: [{
                type: Input
            }], yAxisAnnotationTextColor: [{
                type: Input
            }], yAxisAnnotationBackground: [{
                type: Input
            }], yAxisAnnotationBackgroundCornerRadius: [{
                type: Input
            }], yAxisAnnotationInterpolatedValuePrecision: [{
                type: Input
            }], yAxisAnnotationOutline: [{
                type: Input
            }], yAxisAnnotationStrokeThickness: [{
                type: Input
            }], skipUnknownValues: [{
                type: Input
            }] } });
