var IgxCrosshairLayerComponent_1;
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 const IgxCrosshairLayerComponent_PROVIDERS = [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(() => IgxCrosshairLayerComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCrosshairLayerComponent) }];
let IgxCrosshairLayerComponent = IgxCrosshairLayerComponent_1 = class IgxCrosshairLayerComponent extends IgxAnnotationLayerComponent {
    constructor() {
        super();
    }
    createImplementation() {
        return new CrosshairLayer();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets the color to use for the horizontal line. Leave null for an automatic value.
    */
    get horizontalLineStroke() {
        return brushToString(this.i.pa);
    }
    set horizontalLineStroke(v) {
        this.i.pa = stringToBrush(v);
    }
    /**
     * Gets or sets the color to use for vertical line. Leave null for an automatic value.
    */
    get verticalLineStroke() {
        return brushToString(this.i.pb);
    }
    set verticalLineStroke(v) {
        this.i.pb = stringToBrush(v);
    }
    /**
     * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
    */
    get targetSeries() {
        if (this.i.m7 == null) {
            return null;
        }
        if (!this.i.m7.externalObject) {
            let e = IgxSeriesComponent._createFromInternal(this.i.m7);
            if (e) {
                e._implementation = this.i.m7;
            }
            this.i.m7.externalObject = e;
        }
        return this.i.m7.externalObject;
    }
    set targetSeries(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;
    }
    /**
     * 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.nc;
    }
    set useInterpolation(v) {
        this.i.nc = ensureBool(v);
    }
    /**
     * Gets or sets whether to draw annotations over the axes where the crosshair meets with them.
    */
    get isAxisAnnotationEnabled() {
        return this.i.na;
    }
    set isAxisAnnotationEnabled(v) {
        this.i.na = 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.pe);
    }
    set xAxisAnnotationTextColor(v) {
        this.i.pe = 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.pc);
    }
    set xAxisAnnotationBackground(v) {
        this.i.pc = stringToBrush(v);
    }
    /**
     * Gets or sets the precision to use displaying values for interpolated crosshair positions.
    */
    get xAxisAnnotationInterpolatedValuePrecision() {
        return this.i.np;
    }
    set xAxisAnnotationInterpolatedValuePrecision(v) {
        this.i.np = +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.pd);
    }
    set xAxisAnnotationOutline(v) {
        this.i.pd = 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.ng;
    }
    set xAxisAnnotationPaddingLeft(v) {
        this.i.ng = +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.ni;
    }
    set xAxisAnnotationPaddingTop(v) {
        this.i.ni = +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.nh;
    }
    set xAxisAnnotationPaddingRight(v) {
        this.i.nh = +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.nf;
    }
    set xAxisAnnotationPaddingBottom(v) {
        this.i.nf = +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.nl;
    }
    set yAxisAnnotationPaddingLeft(v) {
        this.i.nl = +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.nn;
    }
    set yAxisAnnotationPaddingTop(v) {
        this.i.nn = +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.nm;
    }
    set yAxisAnnotationPaddingRight(v) {
        this.i.nm = +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.nk;
    }
    set yAxisAnnotationPaddingBottom(v) {
        this.i.nk = +v;
    }
    /**
     * Gets or sets the stroke thickness for the x axis annotation backing. Leave unset for an automatic value.
    */
    get xAxisAnnotationStrokeThickness() {
        return this.i.nj;
    }
    set xAxisAnnotationStrokeThickness(v) {
        this.i.nj = +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.ph);
    }
    set yAxisAnnotationTextColor(v) {
        this.i.ph = 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.pf);
    }
    set yAxisAnnotationBackground(v) {
        this.i.pf = stringToBrush(v);
    }
    /**
     * Gets or sets the precision to use displaying values for interpolated crosshair positions.
    */
    get yAxisAnnotationInterpolatedValuePrecision() {
        return this.i.nq;
    }
    set yAxisAnnotationInterpolatedValuePrecision(v) {
        this.i.nq = +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.pg);
    }
    set yAxisAnnotationOutline(v) {
        this.i.pg = 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.no;
    }
    set yAxisAnnotationStrokeThickness(v) {
        this.i.no = +v;
    }
    /**
     * Gets or sets whether to display the vertical line.
    */
    get verticalLineVisibility() {
        return this.i.pl;
    }
    set verticalLineVisibility(v) {
        this.i.pl = ensureEnum(Visibility_$type, v);
    }
    /**
     * Gets or sets whether to display the horizontal line.
    */
    get horizontalLineVisibility() {
        return this.i.pk;
    }
    set horizontalLineVisibility(v) {
        this.i.pk = ensureEnum(Visibility_$type, v);
    }
    /**
     * Gets or sets whether to skip unknown values when searching for series values.
    */
    get skipUnknownValues() {
        return this.i.nb;
    }
    set skipUnknownValues(v) {
        this.i.nb = ensureBool(v);
    }
    _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;
    }
};
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(() => IgxCrosshairLayerComponent_1) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCrosshairLayerComponent_1) }],
        changeDetection: ChangeDetectionStrategy.OnPush
    }),
    tslib_1.__metadata("design:paramtypes", [])
], IgxCrosshairLayerComponent);
export { IgxCrosshairLayerComponent };
//# sourceMappingURL=igx-crosshair-layer-component.js.map