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.
*/
export let IgxValueOverlayComponent = /*@__PURE__*/ (() => {
    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() {
            const r = this.i.wy;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                let e = IgxAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        }
        set axis(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.wy = null : this.i.wy = v.i;
        }
        /**
         * Gets or sets the value of the overlay.
        */
        get value() {
            return this.i.xh;
        }
        set value(v) {
            this.i.xh = +v;
        }
        /**
         * Gets or sets whether to draw annotations over the axes where the crosshair meets with them.
        */
        get isAxisAnnotationEnabled() {
            return this.i.w2;
        }
        set isAxisAnnotationEnabled(v) {
            this.i.w2 = 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.w0;
        }
        set axisAnnotationFormatLabel(v) {
            this.i.w0 = 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.yh);
        }
        set axisAnnotationTextColor(v) {
            this.i.yh = 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.yf);
        }
        set axisAnnotationBackground(v) {
            this.i.yf = stringToBrush(v);
        }
        /**
         * Gets or sets the corner radius to use for the axis annotation backing. Leave unset for an automatic value.
        */
        get axisAnnotationBackgroundCornerRadius() {
            return this.i.w6;
        }
        set axisAnnotationBackgroundCornerRadius(v) {
            this.i.w6 = +v;
        }
        /**
         * Gets or sets the precision to use displaying values for interpolated positions.
        */
        get axisAnnotationInterpolatedValuePrecision() {
            return this.i.xi;
        }
        set axisAnnotationInterpolatedValuePrecision(v) {
            this.i.xi = +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.yg);
        }
        set axisAnnotationOutline(v) {
            this.i.yg = 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.w8;
        }
        set axisAnnotationPaddingLeft(v) {
            this.i.w8 = +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.xa;
        }
        set axisAnnotationPaddingTop(v) {
            this.i.xa = +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.w9;
        }
        set axisAnnotationPaddingRight(v) {
            this.i.w9 = +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.w7;
        }
        set axisAnnotationPaddingBottom(v) {
            this.i.w7 = +v;
        }
        /**
         * Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
        */
        get axisAnnotationStrokeThickness() {
            return this.i.xb;
        }
        set axisAnnotationStrokeThickness(v) {
            this.i.xb = +v;
        }
        /**
         * Gets whether the series is a value overlay.
        */
        get isValueOverlay() {
            return this.i.isValueOverlay;
        }
        get labelResolved() {
            return this.i.xx;
        }
        findByName(name) {
            var baseResult = super.findByName(name);
            if (baseResult) {
                return baseResult;
            }
            if (this.axis && this.axis.name && this.axis.name == name) {
                return this.axis;
            }
            return null;
        }
        _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.i5(toPoint(world), useInterpolation, skipUnknowns);
            return (iv);
        }
        getSeriesValuePosition(world, useInterpolation, skipUnknowns) {
            let iv = this.i.wc(toPoint(world), useInterpolation, skipUnknowns);
            return fromPoint(iv);
        }
        /**
         * Gets the item index associated with the specified world position
        
        * @param world
        */
        getItemIndex(world) {
            let iv = this.i.j3(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.kn(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.gd(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.xv(value);
            return (iv);
        }
    }
    IgxValueOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxValueOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxValueOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxValueOverlayComponent, selector: "igx-value-overlay", inputs: { axis: "axis", value: "value", isAxisAnnotationEnabled: "isAxisAnnotationEnabled", axisAnnotationFormatLabel: "axisAnnotationFormatLabel", axisAnnotationTextColor: "axisAnnotationTextColor", axisAnnotationBackground: "axisAnnotationBackground", axisAnnotationBackgroundCornerRadius: "axisAnnotationBackgroundCornerRadius", axisAnnotationInterpolatedValuePrecision: "axisAnnotationInterpolatedValuePrecision", axisAnnotationOutline: "axisAnnotationOutline", axisAnnotationPaddingLeft: "axisAnnotationPaddingLeft", axisAnnotationPaddingTop: "axisAnnotationPaddingTop", axisAnnotationPaddingRight: "axisAnnotationPaddingRight", axisAnnotationPaddingBottom: "axisAnnotationPaddingBottom", axisAnnotationStrokeThickness: "axisAnnotationStrokeThickness" }, providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxValueOverlayComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxValueOverlayComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxValueOverlayComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-value-overlay',
                    template: ``,
                    providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(() => 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
            }], axisAnnotationBackgroundCornerRadius: [{
                type: Input
            }], axisAnnotationInterpolatedValuePrecision: [{
                type: Input
            }], axisAnnotationOutline: [{
                type: Input
            }], axisAnnotationPaddingLeft: [{
                type: Input
            }], axisAnnotationPaddingTop: [{
                type: Input
            }], axisAnnotationPaddingRight: [{
                type: Input
            }], axisAnnotationPaddingBottom: [{
                type: Input
            }], axisAnnotationStrokeThickness: [{
                type: Input
            }] } });
