import * as tslib_1 from "tslib";
import { IgrNumericAngleAxis } from "./igr-numeric-angle-axis";
import { IgrNumericRadiusAxis } from "./igr-numeric-radius-axis";
import { TrendLineType_$type } from "igniteui-react-core";
import { IgrMarkerSeries } from "./igr-marker-series";
import { ensureBool, ensureEnum, brushToString, stringToBrush, toPoint } from "igniteui-react-core";
/**
 * Represents the base class from which all IgxDataChartComponent polar series are derived.
*/
var IgrPolarBase = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgrPolarBase, _super);
    function IgrPolarBase(props) {
        var _this = _super.call(this, props) || this;
        _this._angleAxisName = null;
        _this._radiusAxisName = null;
        return _this;
    }
    Object.defineProperty(IgrPolarBase.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "isPolar", {
        /**
         * Checks if this series is a polar series
        */
        get: function () {
            return this.i.c0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "angleMemberPath", {
        /**
         * Gets or sets the path to use to find the angle values for the series.
        */
        get: function () {
            return this.i.n9;
        },
        set: function (v) {
            this.i.n9 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "radiusMemberPath", {
        /**
         * Gets or sets the path to use to get the radius values for the series.
        */
        get: function () {
            return this.i.of;
        },
        set: function (v) {
            this.i.of = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "angleAxis", {
        /**
         * Gets the effective angle axis for the current series object.
        */
        get: function () {
            if (this.i.ng == null) {
                return null;
            }
            if (!this.i.ng.externalObject) {
                var e = IgrNumericAngleAxis._createFromInternal(this.i.ng);
                if (e) {
                    e._implementation = this.i.ng;
                }
                this.i.ng.externalObject = e;
            }
            return this.i.ng.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.ng = null : this.i.ng = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "angleAxisName", {
        /**
        * Gets or sets the name to use to resolve angleAxis from markup.
        */
        get: function () {
            return this._angleAxisName;
        },
        set: function (v) {
            this._angleAxisName = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "radiusAxis", {
        /**
         * Gets the effective radius axis for the current series object.
        */
        get: function () {
            if (this.i.nh == null) {
                return null;
            }
            if (!this.i.nh.externalObject) {
                var e = IgrNumericRadiusAxis._createFromInternal(this.i.nh);
                if (e) {
                    e._implementation = this.i.nh;
                }
                this.i.nh.externalObject = e;
            }
            return this.i.nh.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.nh = null : this.i.nh = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "radiusAxisName", {
        /**
        * Gets or sets the name to use to resolve radiusAxis from markup.
        */
        get: function () {
            return this._radiusAxisName;
        },
        set: function (v) {
            this._radiusAxisName = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "useCartesianInterpolation", {
        /**
         * Gets or sets whether Cartesian Interpolation should be used rather than Archimedian
         * spiral based interpolation.
        */
        get: function () {
            return this.i.n1;
        },
        set: function (v) {
            this.i.n1 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "maximumMarkers", {
        /**
         * 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: function () {
            return this.i.n4;
        },
        set: function (v) {
            this.i.n4 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "trendLineType", {
        /**
         * Gets or sets the trend type for the current series object.
        */
        get: function () {
            return this.i.ns;
        },
        set: function (v) {
            this.i.ns = ensureEnum(TrendLineType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "trendLineBrush", {
        /**
         * Gets or sets the brush that specifies how the current series
         * object's trend line is drawn.
        */
        get: function () {
            return brushToString(this.i.o5);
        },
        set: function (v) {
            this.i.o5 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "actualTrendLineBrush", {
        /**
         * Gets the effective TrendLineBrush for this series.
        */
        get: function () {
            return brushToString(this.i.o4);
        },
        set: function (v) {
            this.i.o4 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "trendLineThickness", {
        /**
         * Gets or sets the thickness of the current series object's trend line.
        */
        get: function () {
            return this.i.n3;
        },
        set: function (v) {
            this.i.n3 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "trendLinePeriod", {
        /**
         * Gets or sets the moving average period for the current series object.
        */
        get: function () {
            return this.i.n5;
        },
        set: function (v) {
            this.i.n5 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "trendLineZIndex", {
        /**
         * Sets or Gets the Trendline Z index.
        */
        get: function () {
            return this.i.n6;
        },
        set: function (v) {
            this.i.n6 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrPolarBase.prototype, "clipSeriesToBounds", {
        /**
         * Gets or sets whether to clip the series to the bounds.
         * Setting this to true can effect performance.
        */
        get: function () {
            return this.i.nz;
        },
        set: function (v) {
            this.i.nz = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    IgrPolarBase.prototype.bindAxes = function (axes) {
        _super.prototype.bindAxes.call(this, axes);
        for (var i = 0; i < axes.length; i++) {
            if (this.angleAxisName && this.angleAxisName.length > 0 &&
                axes[i].name == this.angleAxisName) {
                this.angleAxis = axes[i];
            }
        }
        for (var i = 0; i < axes.length; i++) {
            if (this.radiusAxisName && this.radiusAxisName.length > 0 &&
                axes[i].name == this.radiusAxisName) {
                this.radiusAxis = axes[i];
            }
        }
    };
    IgrPolarBase.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.angleAxis && this.angleAxis.name && this.angleAxis.name == name) {
            return this.angleAxis;
        }
        if (this.radiusAxis && this.radiusAxis.name && this.radiusAxis.name == name) {
            return this.radiusAxis;
        }
        return null;
    };
    IgrPolarBase.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.angleAxis && this.angleAxis._styling) {
            this.angleAxis._styling(container, component, this);
        }
        if (this.radiusAxis && this.radiusAxis._styling) {
            this.radiusAxis._styling(container, component, this);
        }
        this._inStyling = false;
    };
    /**
     * Scrolls the requested item into view, if possible.
    
    * @param item  * The item to scroll into view.
    */
    IgrPolarBase.prototype.scrollIntoView = function (item) {
        var iv = this.i.c9(item);
        return (iv);
    };
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgrPolarBase.prototype.getItem = function (world) {
        var iv = this.i.fp(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.
    */
    IgrPolarBase.prototype.getItemIndex = function (world) {
        var iv = this.i.e8(toPoint(world));
        return (iv);
    };
    IgrPolarBase.prototype.getItemValue = function (item, memberPathName) {
        var iv = this.i.fs(item, memberPathName);
        return (iv);
    };
    /**
     * Determine if object can be used as RadiusAxis
    
    * @param axis  * The object to check
    */
    IgrPolarBase.prototype.canUseAsRadiusAxis = function (axis) {
        var iv = this.i.ny(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as AngleAxis
    
    * @param axis  * The object to check
    */
    IgrPolarBase.prototype.canUseAsAngleAxis = function (axis) {
        var iv = this.i.nx(axis);
        return (iv);
    };
    return IgrPolarBase;
}(IgrMarkerSeries));
export { IgrPolarBase };
//# sourceMappingURL=igr-polar-base.js.map
