import { __extends } 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";
import * as i0 from "@angular/core";
/**
 * Represents the class of the value overlay. The value overlay is a line or circle representing a value on an axis.
*/
var IgxValueOverlayComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxValueOverlayComponent, _super);
    function IgxValueOverlayComponent() {
        return _super.call(this) || this;
    }
    IgxValueOverlayComponent.prototype.createImplementation = function () {
        return new ValueOverlay();
    };
    Object.defineProperty(IgxValueOverlayComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axis", {
        /**
         * Gets or sets the axis used by the value overlay.
        */
        get: function () {
            if (this.i.n9 == null) {
                return null;
            }
            if (!this.i.n9.externalObject) {
                var e = IgxAxisComponent._createFromInternal(this.i.n9);
                if (e) {
                    e._implementation = this.i.n9;
                }
                this.i.n9.externalObject = e;
            }
            return this.i.n9.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.n9 = null : this.i.n9 = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "value", {
        /**
         * Gets or sets the value of the overlay.
        */
        get: function () {
            return this.i.or;
        },
        set: function (v) {
            this.i.or = +v;
        },
        enumerable: false,
        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.od;
        },
        set: function (v) {
            this.i.od = ensureBool(v);
        },
        enumerable: false,
        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.ob;
        },
        set: function (v) {
            this.i.ob = v;
        },
        enumerable: false,
        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.pp);
        },
        set: function (v) {
            this.i.pp = stringToBrush(v);
        },
        enumerable: false,
        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.pn);
        },
        set: function (v) {
            this.i.pn = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "axisAnnotationInterpolatedValuePrecision", {
        /**
         * Gets or sets the precision to use displaying values for interpolated positions.
        */
        get: function () {
            return this.i.os;
        },
        set: function (v) {
            this.i.os = +v;
        },
        enumerable: false,
        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.po);
        },
        set: function (v) {
            this.i.po = stringToBrush(v);
        },
        enumerable: false,
        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.oi;
        },
        set: function (v) {
            this.i.oi = +v;
        },
        enumerable: false,
        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.ok;
        },
        set: function (v) {
            this.i.ok = +v;
        },
        enumerable: false,
        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.oj;
        },
        set: function (v) {
            this.i.oj = +v;
        },
        enumerable: false,
        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.oh;
        },
        set: function (v) {
            this.i.oh = +v;
        },
        enumerable: false,
        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.ol;
        },
        set: function (v) {
            this.i.ol = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "isValueOverlay", {
        /**
         * Gets whether the series is a value overlay.
        */
        get: function () {
            return this.i.dm;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxValueOverlayComponent.prototype, "labelResolved", {
        get: function () {
            return this.i.o6;
        },
        enumerable: false,
        configurable: true
    });
    IgxValueOverlayComponent.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.axis && this.axis.name && this.axis.name == name) {
            return this.axis;
        }
        return null;
    };
    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.fh(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    };
    IgxValueOverlayComponent.prototype.getSeriesValuePosition = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.nt(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.f9(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.gq(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.dq(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.o4(value);
        return (iv);
    };
    IgxValueOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IgxValueOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxValueOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: IgxValueOverlayComponent, selector: "igx-value-overlay", inputs: { axis: "axis", value: "value", isAxisAnnotationEnabled: "isAxisAnnotationEnabled", axisAnnotationFormatLabel: "axisAnnotationFormatLabel", axisAnnotationTextColor: "axisAnnotationTextColor", axisAnnotationBackground: "axisAnnotationBackground", axisAnnotationInterpolatedValuePrecision: "axisAnnotationInterpolatedValuePrecision", axisAnnotationOutline: "axisAnnotationOutline", axisAnnotationPaddingLeft: "axisAnnotationPaddingLeft", axisAnnotationPaddingTop: "axisAnnotationPaddingTop", axisAnnotationPaddingRight: "axisAnnotationPaddingRight", axisAnnotationPaddingBottom: "axisAnnotationPaddingBottom", axisAnnotationStrokeThickness: "axisAnnotationStrokeThickness" }, providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxValueOverlayComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxValueOverlayComponent;
}(IgxSeriesComponent));
export { IgxValueOverlayComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IgxValueOverlayComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-value-overlay',
                    template: "",
                    providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxValueOverlayComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { axis: [{
                type: Input
            }], value: [{
                type: Input
            }], isAxisAnnotationEnabled: [{
                type: Input
            }], axisAnnotationFormatLabel: [{
                type: Input
            }], axisAnnotationTextColor: [{
                type: Input
            }], axisAnnotationBackground: [{
                type: Input
            }], axisAnnotationInterpolatedValuePrecision: [{
                type: Input
            }], axisAnnotationOutline: [{
                type: Input
            }], axisAnnotationPaddingLeft: [{
                type: Input
            }], axisAnnotationPaddingTop: [{
                type: Input
            }], axisAnnotationPaddingRight: [{
                type: Input
            }], axisAnnotationPaddingBottom: [{
                type: Input
            }], axisAnnotationStrokeThickness: [{
                type: Input
            }] } });
//# sourceMappingURL=igx-value-overlay-component.js.map
