import * as tslib_1 from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxSeriesComponent } from "./igx-series-component";
import { Visibility, Visibility_$type } from "igniteui-angular-core";
import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component";
import { CrosshairLayer } from "./CrosshairLayer";
import { brushToString, stringToBrush, ensureBool, ensureEnum } 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 IgxCrosshairLayerComponent_PROVIDERS = [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxCrosshairLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxCrosshairLayerComponent; }) }];
var IgxCrosshairLayerComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxCrosshairLayerComponent, _super);
    function IgxCrosshairLayerComponent() {
        return _super.call(this) || this;
    }
    IgxCrosshairLayerComponent_1 = IgxCrosshairLayerComponent;
    IgxCrosshairLayerComponent.prototype.createImplementation = function () {
        return new CrosshairLayer();
    };
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "horizontalLineStroke", {
        /**
         * Gets or sets the color to use for the horizontal line. Leave null for an automatic value.
        */
        get: function () {
            return brushToString(this.i.pa);
        },
        set: function (v) {
            this.i.pa = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "verticalLineStroke", {
        /**
         * Gets or sets the color to use for vertical line. Leave null for an automatic value.
        */
        get: function () {
            return brushToString(this.i.pb);
        },
        set: function (v) {
            this.i.pb = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.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(IgxCrosshairLayerComponent.prototype, "useInterpolation", {
        /**
         * Gets or sets whether to use value interpolation when drawing a line through the best value for the cursor position.
        */
        get: function () {
            return this.i.nc;
        },
        set: function (v) {
            this.i.nc = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "isAxisAnnotationEnabled", {
        /**
         * Gets or sets whether to draw annotations over the axes where the crosshair meets with them.
        */
        get: function () {
            return this.i.na;
        },
        set: function (v) {
            this.i.na = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "xAxisAnnotationTextColor", {
        /**
         * Gets or sets the color to use for the x axis annotation text. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.pe);
        },
        set: function (v) {
            this.i.pe = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "xAxisAnnotationBackground", {
        /**
         * Gets or sets the color to use for the x axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.pc);
        },
        set: function (v) {
            this.i.pc = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "xAxisAnnotationInterpolatedValuePrecision", {
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get: function () {
            return this.i.np;
        },
        set: function (v) {
            this.i.np = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "xAxisAnnotationOutline", {
        /**
         * Gets or sets the color to use for the x axis annotation outline. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.pd);
        },
        set: function (v) {
            this.i.pd = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "xAxisAnnotationPaddingLeft", {
        /**
         * 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.ng;
        },
        set: function (v) {
            this.i.ng = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "xAxisAnnotationPaddingTop", {
        /**
         * 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.ni;
        },
        set: function (v) {
            this.i.ni = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "xAxisAnnotationPaddingRight", {
        /**
         * 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.nh;
        },
        set: function (v) {
            this.i.nh = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "xAxisAnnotationPaddingBottom", {
        /**
         * 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.nf;
        },
        set: function (v) {
            this.i.nf = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "yAxisAnnotationPaddingLeft", {
        /**
         * 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.nl;
        },
        set: function (v) {
            this.i.nl = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "yAxisAnnotationPaddingTop", {
        /**
         * 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.nn;
        },
        set: function (v) {
            this.i.nn = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "yAxisAnnotationPaddingRight", {
        /**
         * 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.nm;
        },
        set: function (v) {
            this.i.nm = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "yAxisAnnotationPaddingBottom", {
        /**
         * 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.nk;
        },
        set: function (v) {
            this.i.nk = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "xAxisAnnotationStrokeThickness", {
        /**
         * Gets or sets the stroke thickness for the x axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.nj;
        },
        set: function (v) {
            this.i.nj = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "yAxisAnnotationTextColor", {
        /**
         * Gets or sets the color to use for the y axis annotation text. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.ph);
        },
        set: function (v) {
            this.i.ph = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "yAxisAnnotationBackground", {
        /**
         * Gets or sets the color to use for the y axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.pf);
        },
        set: function (v) {
            this.i.pf = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "yAxisAnnotationInterpolatedValuePrecision", {
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get: function () {
            return this.i.nq;
        },
        set: function (v) {
            this.i.nq = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "yAxisAnnotationOutline", {
        /**
         * Gets or sets the color to use for the y axis annotation outline. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.pg);
        },
        set: function (v) {
            this.i.pg = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "yAxisAnnotationStrokeThickness", {
        /**
         * Gets or sets the stroke thickness for the y axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.no;
        },
        set: function (v) {
            this.i.no = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "verticalLineVisibility", {
        /**
         * Gets or sets whether to display the vertical line.
        */
        get: function () {
            return this.i.pl;
        },
        set: function (v) {
            this.i.pl = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "horizontalLineVisibility", {
        /**
         * Gets or sets whether to display the horizontal line.
        */
        get: function () {
            return this.i.pk;
        },
        set: function (v) {
            this.i.pk = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCrosshairLayerComponent.prototype, "skipUnknownValues", {
        /**
         * Gets or sets whether to skip unknown values when searching for series values.
        */
        get: function () {
            return this.i.nb;
        },
        set: function (v) {
            this.i.nb = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    IgxCrosshairLayerComponent.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 IgxCrosshairLayerComponent_1;
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxCrosshairLayerComponent.prototype, "horizontalLineStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxCrosshairLayerComponent.prototype, "verticalLineStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxSeriesComponent),
        tslib_1.__metadata("design:paramtypes", [IgxSeriesComponent])
    ], IgxCrosshairLayerComponent.prototype, "targetSeries", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxCrosshairLayerComponent.prototype, "useInterpolation", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxCrosshairLayerComponent.prototype, "isAxisAnnotationEnabled", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxCrosshairLayerComponent.prototype, "xAxisAnnotationTextColor", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxCrosshairLayerComponent.prototype, "xAxisAnnotationBackground", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "xAxisAnnotationInterpolatedValuePrecision", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxCrosshairLayerComponent.prototype, "xAxisAnnotationOutline", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "xAxisAnnotationPaddingLeft", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "xAxisAnnotationPaddingTop", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "xAxisAnnotationPaddingRight", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "xAxisAnnotationPaddingBottom", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "yAxisAnnotationPaddingLeft", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "yAxisAnnotationPaddingTop", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "yAxisAnnotationPaddingRight", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "yAxisAnnotationPaddingBottom", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "xAxisAnnotationStrokeThickness", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxCrosshairLayerComponent.prototype, "yAxisAnnotationTextColor", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxCrosshairLayerComponent.prototype, "yAxisAnnotationBackground", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "yAxisAnnotationInterpolatedValuePrecision", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxCrosshairLayerComponent.prototype, "yAxisAnnotationOutline", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "yAxisAnnotationStrokeThickness", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "verticalLineVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxCrosshairLayerComponent.prototype, "horizontalLineVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxCrosshairLayerComponent.prototype, "skipUnknownValues", null);
    IgxCrosshairLayerComponent = IgxCrosshairLayerComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-crosshair-layer',
            template: "",
            providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxCrosshairLayerComponent_1; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxCrosshairLayerComponent_1; }) }],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxCrosshairLayerComponent);
    return IgxCrosshairLayerComponent;
}(IgxAnnotationLayerComponent));
export { IgxCrosshairLayerComponent };
//# sourceMappingURL=igx-crosshair-layer-component.js.map