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 var IgxValueOverlayComponent_PROVIDERS = [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxValueOverlayComponent; }) }];
var IgxValueOverlayComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxValueOverlayComponent, _super);
    function IgxValueOverlayComponent() {
        return _super.call(this) || this;
    }
    IgxValueOverlayComponent_1 = IgxValueOverlayComponent;
    IgxValueOverlayComponent.prototype.createImplementation = function () {
        return new ValueOverlay();
    };
    Object.defineProperty(IgxValueOverlayComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axis", {
        /**
         * Gets or sets the axis used by the value overlay.
        */
        get: function () {
            if (this.i.l0 == null) {
                return null;
            }
            if (!this.i.l0.externalObject) {
                var e = IgxAxisComponent._createFromInternal(this.i.l0);
                if (e) {
                    e._implementation = this.i.l0;
                }
                this.i.l0.externalObject = e;
            }
            return this.i.l0.externalObject;
        },
        set: function (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;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "value", {
        /**
         * Gets or sets the value of the overlay.
        */
        get: function () {
            return this.i.mi;
        },
        set: function (v) {
            this.i.mi = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "isAxisAnnotationEnabled", {
        /**
         * Gets or sets whether to draw annotations over the axes where the crosshair meets with them.
        */
        get: function () {
            return this.i.l4;
        },
        set: function (v) {
            this.i.l4 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationFormatLabel", {
        /**
         * Sets or gets a function which takes an object that produces a formatted label for the axis annotation.
        */
        get: function () {
            return this.i.l2;
        },
        set: function (v) {
            this.i.l2 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationTextColor", {
        /**
         * Gets or sets the color to use for the axis annotation text. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.ng);
        },
        set: function (v) {
            this.i.ng = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationBackground", {
        /**
         * Gets or sets the color to use for the axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.ne);
        },
        set: function (v) {
            this.i.ne = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationInterpolatedValuePrecision", {
        /**
         * Gets or sets the precision to use displaying values for interpolated positions.
        */
        get: function () {
            return this.i.mj;
        },
        set: function (v) {
            this.i.mj = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationOutline", {
        /**
         * Gets or sets the color to use for the axis annotation outline. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.nf);
        },
        set: function (v) {
            this.i.nf = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationPaddingLeft", {
        /**
         * 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.l9;
        },
        set: function (v) {
            this.i.l9 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationPaddingTop", {
        /**
         * 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.mb;
        },
        set: function (v) {
            this.i.mb = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationPaddingRight", {
        /**
         * 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.ma;
        },
        set: function (v) {
            this.i.ma = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationPaddingBottom", {
        /**
         * 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.l8;
        },
        set: function (v) {
            this.i.l8 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationStrokeThickness", {
        /**
         * Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.mc;
        },
        set: function (v) {
            this.i.mc = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "isValueOverlay", {
        /**
         * Gets whether the series is a value overlay.
        */
        get: function () {
            return this.i.c6;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "labelResolved", {
        get: function () {
            return this.i.mx;
        },
        enumerable: true,
        configurable: true
    });
    IgxValueOverlayComponent.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.axis && this.axis._styling) {
            this.axis._styling(container, component, this);
        }
        this._inStyling = false;
    };
    IgxValueOverlayComponent.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.en(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    };
    IgxValueOverlayComponent.prototype.getSeriesValuePosition = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.ll(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    };
    /**
     * Gets the item item index associated with the specified world position
    
    * @param world
    */
    IgxValueOverlayComponent.prototype.getItemIndex = function (world) {
        var 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.
    */
    IgxValueOverlayComponent.prototype.getItem = function (world) {
        var 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.
    */
    IgxValueOverlayComponent.prototype.scrollIntoView = function (item) {
        var iv = this.i.c9(item);
        return (iv);
    };
    /**
     * Gets the label for a data item.
    
    * @param value  * The unscaled value to get a label for.
    */
    IgxValueOverlayComponent.prototype.getLabel = function (value) {
        var iv = this.i.mv(value);
        return (iv);
    };
    var IgxValueOverlayComponent_1;
    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(function () { return IgxValueOverlayComponent_1; }) }],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxValueOverlayComponent);
    return IgxValueOverlayComponent;
}(IgxSeriesComponent));
export { IgxValueOverlayComponent };
//# sourceMappingURL=igx-value-overlay-component.js.map