import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxSeriesComponent } from "./igx-series-component";
import { Visibility_$type } from "igniteui-angular-core";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { CrosshairLayer } from "./CrosshairLayer";
import { ensureBool, brushToString, stringToBrush, ensureEnum } 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 IgxCrosshairLayerComponent = /*@__PURE__*/ (() => {
    class IgxCrosshairLayerComponent extends IgxAnnotationLayerComponent {
        constructor() {
            super();
        }
        createImplementation() {
            return new CrosshairLayer();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets whether the series is an annotation layer displayed only when hovering over the chart.
        */
        get isAnnotationHoverLayer() {
            return this.i.db;
        }
        /**
         * Gets whether the series is an crosshair annotation layer.
        */
        get isAnnotationCrosshairLayer() {
            return this.i.c9;
        }
        /**
         * Gets or sets the color to use for the horizontal line. Leave null for an automatic value.
        */
        get horizontalLineStroke() {
            return brushToString(this.i.tr);
        }
        set horizontalLineStroke(v) {
            this.i.tr = stringToBrush(v);
        }
        /**
         * Gets or sets the color to use for vertical line. Leave null for an automatic value.
        */
        get verticalLineStroke() {
            return brushToString(this.i.ts);
        }
        set verticalLineStroke(v) {
            this.i.ts = 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.r5;
        }
        set targetSeriesName(v) {
            this.i.r5 = 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.rf;
            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.rf = null : this.i.rf = 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.rk;
        }
        set useInterpolation(v) {
            this.i.rk = ensureBool(v);
        }
        /**
         * Gets or sets whether to draw annotations over the axes where the crosshair meets with them.
        */
        get isAxisAnnotationEnabled() {
            return this.i.ri;
        }
        set isAxisAnnotationEnabled(v) {
            this.i.ri = ensureBool(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.tv);
        }
        set xAxisAnnotationTextColor(v) {
            this.i.tv = 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.tt);
        }
        set xAxisAnnotationBackground(v) {
            this.i.tt = 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.rn;
        }
        set xAxisAnnotationBackgroundCornerRadius(v) {
            this.i.rn = +v;
        }
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get xAxisAnnotationInterpolatedValuePrecision() {
            return this.i.rz;
        }
        set xAxisAnnotationInterpolatedValuePrecision(v) {
            this.i.rz = +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.tu);
        }
        set xAxisAnnotationOutline(v) {
            this.i.tu = 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.rp;
        }
        set xAxisAnnotationPaddingLeft(v) {
            this.i.rp = +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.rr;
        }
        set xAxisAnnotationPaddingTop(v) {
            this.i.rr = +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.rq;
        }
        set xAxisAnnotationPaddingRight(v) {
            this.i.rq = +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.ro;
        }
        set xAxisAnnotationPaddingBottom(v) {
            this.i.ro = +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.rv;
        }
        set yAxisAnnotationPaddingLeft(v) {
            this.i.rv = +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.rx;
        }
        set yAxisAnnotationPaddingTop(v) {
            this.i.rx = +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.rw;
        }
        set yAxisAnnotationPaddingRight(v) {
            this.i.rw = +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.ru;
        }
        set yAxisAnnotationPaddingBottom(v) {
            this.i.ru = +v;
        }
        /**
         * Gets or sets the stroke thickness for the x axis annotation backing. Leave unset for an automatic value.
        */
        get xAxisAnnotationStrokeThickness() {
            return this.i.rs;
        }
        set xAxisAnnotationStrokeThickness(v) {
            this.i.rs = +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.ty);
        }
        set yAxisAnnotationTextColor(v) {
            this.i.ty = 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.tw);
        }
        set yAxisAnnotationBackground(v) {
            this.i.tw = 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.rt;
        }
        set yAxisAnnotationBackgroundCornerRadius(v) {
            this.i.rt = +v;
        }
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get yAxisAnnotationInterpolatedValuePrecision() {
            return this.i.r0;
        }
        set yAxisAnnotationInterpolatedValuePrecision(v) {
            this.i.r0 = +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.tx);
        }
        set yAxisAnnotationOutline(v) {
            this.i.tx = 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.ry;
        }
        set yAxisAnnotationStrokeThickness(v) {
            this.i.ry = +v;
        }
        /**
         * Gets or sets whether to display the vertical line.
        */
        get verticalLineVisibility() {
            return this.i.t2;
        }
        set verticalLineVisibility(v) {
            this.i.t2 = ensureEnum(Visibility_$type, v);
        }
        /**
         * Gets or sets whether to display the horizontal line.
        */
        get horizontalLineVisibility() {
            return this.i.t1;
        }
        set horizontalLineVisibility(v) {
            this.i.t1 = ensureEnum(Visibility_$type, v);
        }
        /**
         * Gets or sets whether to skip unknown values when searching for series values.
        */
        get skipUnknownValues() {
            return this.i.rj;
        }
        set skipUnknownValues(v) {
            this.i.rj = ensureBool(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;
        }
    }
    IgxCrosshairLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCrosshairLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxCrosshairLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxCrosshairLayerComponent, selector: "igx-crosshair-layer", inputs: { horizontalLineStroke: "horizontalLineStroke", verticalLineStroke: "verticalLineStroke", targetSeriesName: "targetSeriesName", targetSeries: "targetSeries", useInterpolation: "useInterpolation", isAxisAnnotationEnabled: "isAxisAnnotationEnabled", 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", verticalLineVisibility: "verticalLineVisibility", horizontalLineVisibility: "horizontalLineVisibility", skipUnknownValues: "skipUnknownValues" }, providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxCrosshairLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCrosshairLayerComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxCrosshairLayerComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCrosshairLayerComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-crosshair-layer',
                    template: ``,
                    providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxCrosshairLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCrosshairLayerComponent) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { horizontalLineStroke: [{
                type: Input
            }], verticalLineStroke: [{
                type: Input
            }], targetSeriesName: [{
                type: Input
            }], targetSeries: [{
                type: Input
            }], useInterpolation: [{
                type: Input
            }], isAxisAnnotationEnabled: [{
                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
            }], verticalLineVisibility: [{
                type: Input
            }], horizontalLineVisibility: [{
                type: Input
            }], skipUnknownValues: [{
                type: Input
            }] } });
