/*
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 { IgrNumericAngleAxis } from './igr-numeric-angle-axis';
import { IgrNumericRadiusAxis } from './igr-numeric-radius-axis';
import { IgrMarkerSeries } from './igr-marker-series';
import { brushToString, stringToBrush, toPoint, ensureBool, ensureEnum } from "igniteui-react-core/ES2015/componentUtil";
import { TrendLineType_$type } from "igniteui-react-core/ES2015/TrendLineType";
/**
 * Represents the base class from which all IgxDataChartComponent polar series are derived.
*/
export class IgrPolarBase extends IgrMarkerSeries {
    constructor(props) {
        super(props);
    }
    set angleAxisName(value) {
        this._angleAxisName = value;
    }
    get angleAxisName() {
        return this._angleAxisName;
    }
    set radiusAxisName(value) {
        this._radiusAxisName = value;
    }
    get radiusAxisName() {
        return this._radiusAxisName;
    }
    bindAxes(axes) {
        for (let i = 0; i < axes.length; i++) {
            if (axes[i].name == this.angleAxisName) {
                this.angleAxis = axes[i];
            }
            if (axes[i].name == this.radiusAxisName) {
                this.radiusAxis = axes[i];
            }
        }
    }
    get i() {
        return this._implementation;
    }
    /**
 * Checks if this series is a polar series
*/
    get isPolar() {
        return this.i.c0;
    }
    /**
     * Gets or sets the path to use to find the angle values for the series.
    */
    get angleMemberPath() {
        return this.i.np;
    }
    set angleMemberPath(v) {
        this.i.np = v;
    }
    /**
     * Gets or sets the path to use to get the radius values for the series.
    */
    get radiusMemberPath() {
        return this.i.nv;
    }
    set radiusMemberPath(v) {
        this.i.nv = v;
    }
    /**
     * Gets the effective angle axis for the current series object.
    */
    get angleAxis() {
        if (this.i.mw == null) {
            return null;
        }
        if (!this.i.mw.externalObject) {
            let e = new IgrNumericAngleAxis(null);
            e._implementation = this.i.mw;
            this.i.mw.externalObject = e;
        }
        return this.i.mw.externalObject;
    }
    set angleAxis(v) {
        v == null ? this.i.mw = null : this.i.mw = v.i;
    }
    /**
     * Gets the effective radius axis for the current series object.
    */
    get radiusAxis() {
        if (this.i.mx == null) {
            return null;
        }
        if (!this.i.mx.externalObject) {
            let e = new IgrNumericRadiusAxis(null);
            e._implementation = this.i.mx;
            this.i.mx.externalObject = e;
        }
        return this.i.mx.externalObject;
    }
    set radiusAxis(v) {
        v == null ? this.i.mx = null : this.i.mx = v.i;
    }
    /**
     * Gets or sets whether Cartesian Interpolation should be used rather than Archimedian
     * spiral based interpolation.
    */
    get useCartesianInterpolation() {
        return this.i.nh;
    }
    set useCartesianInterpolation(v) {
        this.i.nh = ensureBool(v);
    }
    /**
     * Gets or sets the maximum number of markers displayed by the current series.
     * If more than the specified number of markers are visible, the polar series will automatically
     * choose a representative set.
    */
    get maximumMarkers() {
        return this.i.nk;
    }
    set maximumMarkers(v) {
        this.i.nk = +v;
    }
    /**
     * Gets or sets the trend type for the current series object.
    */
    get trendLineType() {
        return this.i.m8;
    }
    set trendLineType(v) {
        this.i.m8 = ensureEnum(TrendLineType_$type, v);
    }
    /**
     * Gets or sets the brush that specifies how the current series
     * object's trend line is drawn.
    */
    get trendLineBrush() {
        return brushToString(this.i.ol);
    }
    set trendLineBrush(v) {
        this.i.ol = stringToBrush(v);
    }
    /**
     * Gets the effective TrendLineBrush for this series.
    */
    get actualTrendLineBrush() {
        return brushToString(this.i.ok);
    }
    set actualTrendLineBrush(v) {
        this.i.ok = stringToBrush(v);
    }
    /**
     * Gets or sets the thickness of the current series object's trend line.
    */
    get trendLineThickness() {
        return this.i.nj;
    }
    set trendLineThickness(v) {
        this.i.nj = +v;
    }
    /**
     * Gets or sets the moving average period for the current series object.
    */
    get trendLinePeriod() {
        return this.i.nl;
    }
    set trendLinePeriod(v) {
        this.i.nl = +v;
    }
    /**
     * Sets or Gets the Trendline Z index.
    */
    get trendLineZIndex() {
        return this.i.nm;
    }
    set trendLineZIndex(v) {
        this.i.nm = +v;
    }
    /**
     * Gets or sets whether to clip the series to the bounds.
     * Setting this to true can effect performance.
    */
    get clipSeriesToBounds() {
        return this.i.nf;
    }
    set clipSeriesToBounds(v) {
        this.i.nf = ensureBool(v);
    }
    /**
 * Scrolls the requested item into view, if possible.

* @param item  * The item to scroll into view.
*/
    scrollIntoView(item) {
        let iv = this.i.c8(item);
        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.fm(toPoint(world));
        return (iv);
    }
    /**
     * Gets the index of the item that resides at the provided world coordinates.
    
    * @param world  * The world coordinates of the requested item.
    */
    getItemIndex(world) {
        let iv = this.i.e5(toPoint(world));
        return (iv);
    }
    /**
     * Determine if object can be used as RadiusAxis
    
    * @param axis  * The object to check
    */
    canUseAsRadiusAxis(axis) {
        let iv = this.i.ne(axis);
        return (iv);
    }
    /**
     * Determine if object can be used as AngleAxis
    
    * @param axis  * The object to check
    */
    canUseAsAngleAxis(axis) {
        let iv = this.i.nd(axis);
        return (iv);
    }
}
