var IgxValueOverlayComponent_1;
import * as tslib_1 from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxAxisComponent } from "./igx-axis-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { ValueOverlay } from "./ValueOverlay";
import { ensureBool, brushToString, stringToBrush, toPoint, fromPoint } from "igniteui-angular-core";
/**
 * Represents the class of the value overlay. The value overlay is a line or circle representing a value on an axis.
*/
export const IgxValueOverlayComponent_PROVIDERS = [{ provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxValueOverlayComponent) }];
let IgxValueOverlayComponent = IgxValueOverlayComponent_1 = class IgxValueOverlayComponent extends IgxSeriesComponent {
    constructor() {
        super();
    }
    createImplementation() {
        return new ValueOverlay();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets the axis used by the value overlay.
    */
    get axis() {
        if (this.i.l0 == null) {
            return null;
        }
        if (!this.i.l0.externalObject) {
            let e = IgxAxisComponent._createFromInternal(this.i.l0);
            if (e) {
                e._implementation = this.i.l0;
            }
            this.i.l0.externalObject = e;
        }
        return this.i.l0.externalObject;
    }
    set axis(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.l0 = null : this.i.l0 = v.i;
    }
    /**
     * Gets or sets the value of the overlay.
    */
    get value() {
        return this.i.mi;
    }
    set value(v) {
        this.i.mi = +v;
    }
    /**
     * Gets or sets whether to draw annotations over the axes where the crosshair meets with them.
    */
    get isAxisAnnotationEnabled() {
        return this.i.l4;
    }
    set isAxisAnnotationEnabled(v) {
        this.i.l4 = ensureBool(v);
    }
    /**
     * Sets or gets a function which takes an object that produces a formatted label for the axis annotation.
    */
    get axisAnnotationFormatLabel() {
        return this.i.l2;
    }
    set axisAnnotationFormatLabel(v) {
        this.i.l2 = 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.ng);
    }
    set axisAnnotationTextColor(v) {
        this.i.ng = 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.ne);
    }
    set axisAnnotationBackground(v) {
        this.i.ne = stringToBrush(v);
    }
    /**
     * Gets or sets the precision to use displaying values for interpolated positions.
    */
    get axisAnnotationInterpolatedValuePrecision() {
        return this.i.mj;
    }
    set axisAnnotationInterpolatedValuePrecision(v) {
        this.i.mj = +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.nf);
    }
    set axisAnnotationOutline(v) {
        this.i.nf = 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 axisAnnotationPaddingLeft() {
        return this.i.l9;
    }
    set axisAnnotationPaddingLeft(v) {
        this.i.l9 = +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.mb;
    }
    set axisAnnotationPaddingTop(v) {
        this.i.mb = +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.ma;
    }
    set axisAnnotationPaddingRight(v) {
        this.i.ma = +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.l8;
    }
    set axisAnnotationPaddingBottom(v) {
        this.i.l8 = +v;
    }
    /**
     * Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
    */
    get axisAnnotationStrokeThickness() {
        return this.i.mc;
    }
    set axisAnnotationStrokeThickness(v) {
        this.i.mc = +v;
    }
    /**
     * Gets whether the series is a value overlay.
    */
    get isValueOverlay() {
        return this.i.c6;
    }
    get labelResolved() {
        return this.i.mx;
    }
    _styling(container, component, parent) {
        super._styling(container, component, parent);
        this._inStyling = true;
        if (this.axis && this.axis._styling) {
            this.axis._styling(container, component, this);
        }
        this._inStyling = false;
    }
    getSeriesValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.en(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getSeriesValuePosition(world, useInterpolation, skipUnknowns) {
        let iv = this.i.ll(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    }
    /**
     * Gets the item item index associated with the specified world position
    
    * @param world
    */
    getItemIndex(world) {
        let iv = this.i.e8(toPoint(world));
        return (iv);
    }
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    getItem(world) {
        let iv = this.i.fp(toPoint(world));
        return (iv);
    }
    /**
     * Requests that the provided item should be brought into view if possible.
    
    * @param item  * The item to attempt to bring into view.
    */
    scrollIntoView(item) {
        let iv = this.i.c9(item);
        return (iv);
    }
    /**
     * Gets the label for a data item.
    
    * @param value  * The unscaled value to get a label for.
    */
    getLabel(value) {
        let iv = this.i.mv(value);
        return (iv);
    }
};
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxAxisComponent),
    tslib_1.__metadata("design:paramtypes", [IgxAxisComponent])
], IgxValueOverlayComponent.prototype, "axis", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxValueOverlayComponent.prototype, "value", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Boolean),
    tslib_1.__metadata("design:paramtypes", [Boolean])
], IgxValueOverlayComponent.prototype, "isAxisAnnotationEnabled", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", [Function])
], IgxValueOverlayComponent.prototype, "axisAnnotationFormatLabel", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", String),
    tslib_1.__metadata("design:paramtypes", [String])
], IgxValueOverlayComponent.prototype, "axisAnnotationTextColor", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", String),
    tslib_1.__metadata("design:paramtypes", [String])
], IgxValueOverlayComponent.prototype, "axisAnnotationBackground", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxValueOverlayComponent.prototype, "axisAnnotationInterpolatedValuePrecision", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", String),
    tslib_1.__metadata("design:paramtypes", [String])
], IgxValueOverlayComponent.prototype, "axisAnnotationOutline", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxValueOverlayComponent.prototype, "axisAnnotationPaddingLeft", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxValueOverlayComponent.prototype, "axisAnnotationPaddingTop", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxValueOverlayComponent.prototype, "axisAnnotationPaddingRight", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxValueOverlayComponent.prototype, "axisAnnotationPaddingBottom", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxValueOverlayComponent.prototype, "axisAnnotationStrokeThickness", null);
IgxValueOverlayComponent = IgxValueOverlayComponent_1 = tslib_1.__decorate([
    Component({
        selector: 'igx-value-overlay',
        template: ``,
        providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxValueOverlayComponent_1) }],
        changeDetection: ChangeDetectionStrategy.OnPush
    }),
    tslib_1.__metadata("design:paramtypes", [])
], IgxValueOverlayComponent);
export { IgxValueOverlayComponent };
//# sourceMappingURL=igx-value-overlay-component.js.map