/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { IgrCategoryAngleAxis } from './igr-category-angle-axis';
import { IgrNumericRadiusAxis } from './igr-numeric-radius-axis';
import { IgrMarkerSeries } from './igr-marker-series';
import { toPoint, ensureBool } from "igniteui-react-core/ES5/componentUtil";
/**
 * Represents the base class for all IgxDataChartComponent radial series
*/
var IgrRadialBase = /** @class */ (function (_super) {
    tslib_1.__extends(IgrRadialBase, _super);
    function IgrRadialBase(props) {
        return _super.call(this, props) || this;
    }
    Object.defineProperty(IgrRadialBase.prototype, "angleAxisName", {
        get: function () {
            return this._angleAxisName;
        },
        set: function (value) {
            this._angleAxisName = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrRadialBase.prototype, "valueAxisName", {
        get: function () {
            return this._valueAxisName;
        },
        set: function (value) {
            this._valueAxisName = value;
        },
        enumerable: true,
        configurable: true
    });
    IgrRadialBase.prototype.bindAxes = function (axes) {
        for (var i = 0; i < axes.length; i++) {
            if (axes[i].name == this.angleAxisName) {
                this.angleAxis = axes[i];
            }
            if (axes[i].name == this.valueAxisName) {
                this.valueAxis = axes[i];
            }
        }
    };
    Object.defineProperty(IgrRadialBase.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrRadialBase.prototype, "isRadial", {
        /**
     * Checks if this series is a radial series
    */
        get: function () {
            return this.i.c2;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrRadialBase.prototype, "angleAxis", {
        /**
         * Gets the effective angle axis for the current series object.
        */
        get: function () {
            if (this.i.mt == null) {
                return null;
            }
            if (!this.i.mt.externalObject) {
                var e = new IgrCategoryAngleAxis(null);
                e._implementation = this.i.mt;
                this.i.mt.externalObject = e;
            }
            return this.i.mt.externalObject;
        },
        set: function (v) {
            v == null ? this.i.mt = null : this.i.mt = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrRadialBase.prototype, "valueAxis", {
        /**
         * Gets the effective value axis for the current series object.
        */
        get: function () {
            if (this.i.mv == null) {
                return null;
            }
            if (!this.i.mv.externalObject) {
                var e = new IgrNumericRadiusAxis(null);
                e._implementation = this.i.mv;
                this.i.mv.externalObject = e;
            }
            return this.i.mv.externalObject;
        },
        set: function (v) {
            v == null ? this.i.mv = null : this.i.mv = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrRadialBase.prototype, "clipSeriesToBounds", {
        /**
         * Gets or sets whether to clip the series to the bounds.
         * Setting this property to true will decrease chart performance.
        */
        get: function () {
            return this.i.m4;
        },
        set: function (v) {
            this.i.m4 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    /**
 * Determine if object can be used as ValueAxis

* @param axis  * The object to check
*/
    IgrRadialBase.prototype.canUseAsValueAxis = function (axis) {
        var iv = this.i.m3(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as AngleAxis
    
    * @param axis  * The object to check
    */
    IgrRadialBase.prototype.canUseAsAngleAxis = function (axis) {
        var iv = this.i.m2(axis);
        return (iv);
    };
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgrRadialBase.prototype.getItem = function (world) {
        var iv = this.i.fm(toPoint(world));
        return (iv);
    };
    /**
     * Gets the angle to the provided world position from the center of the radial series.
    
    * @param world  * The world position to get the angle for
    */
    IgrRadialBase.prototype.getAngleFromWorld = function (world) {
        var iv = this.i.m6(toPoint(world));
        return (iv);
    };
    /**
     * Gets the precise item index, if possible, based on the closeness to the previous or next whole integer. If the series cannot provide this information, GetExactItemIndex will return the same integer value as GetItemIndex.
    
    * @param world  * The world position for which to return the index.
    */
    IgrRadialBase.prototype.getExactItemIndex = function (world) {
        var iv = this.i.m7(toPoint(world));
        return (iv);
    };
    /**
     * Get the index of the item near the provided world coordinates.
    
    * @param world  * The world coordinates for which to getch the item index.
    */
    IgrRadialBase.prototype.getItemIndex = function (world) {
        var iv = this.i.e5(toPoint(world));
        return (iv);
    };
    /**
     * Scrolls the specified item into the view.
    
    * @param item  * The item to scroll into view.
    */
    IgrRadialBase.prototype.scrollIntoView = function (item) {
        var iv = this.i.c8(item);
        return (iv);
    };
    /**
     * Returns the offset value for this series if grouped on a category axis.
    
    */
    IgrRadialBase.prototype.getOffsetValue = function () {
        var iv = this.i.getOffsetValue();
        return (iv);
    };
    /**
     * Returns the width of the category grouping this series is in.
    
    */
    IgrRadialBase.prototype.getCategoryWidth = function () {
        var iv = this.i.getCategoryWidth();
        return (iv);
    };
    return IgrRadialBase;
}(IgrMarkerSeries));
export { IgrRadialBase };
