import * as tslib_1 from "tslib";
import { forwardRef, Input } from '@angular/core';
import { IgxCategoryAngleAxisComponent } from "./igx-category-angle-axis-component";
import { IgxNumericRadiusAxisComponent } from "./igx-numeric-radius-axis-component";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { ensureBool, toPoint } from "igniteui-angular-core";
/**
 * Represents the base class for all IgxDataChartComponent radial series
*/
export var IgxRadialBaseComponent_PROVIDERS = [{ provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxRadialBaseComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxRadialBaseComponent; }) }];
var IgxRadialBaseComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxRadialBaseComponent, _super);
    function IgxRadialBaseComponent() {
        return _super.call(this) || this;
    }
    Object.defineProperty(IgxRadialBaseComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxRadialBaseComponent.prototype, "isRadial", {
        /**
         * Checks if this series is a radial series
        */
        get: function () {
            return this.i.c2;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxRadialBaseComponent.prototype, "angleAxis", {
        /**
         * Gets the effective angle axis for the current series object.
        */
        get: function () {
            if (this.i.m0 == null) {
                return null;
            }
            if (!this.i.m0.externalObject) {
                var e = IgxCategoryAngleAxisComponent._createFromInternal(this.i.m0);
                if (e) {
                    e._implementation = this.i.m0;
                }
                this.i.m0.externalObject = e;
            }
            return this.i.m0.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.m0 = null : this.i.m0 = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxRadialBaseComponent.prototype, "valueAxis", {
        /**
         * Gets the effective value axis for the current series object.
        */
        get: function () {
            if (this.i.m2 == null) {
                return null;
            }
            if (!this.i.m2.externalObject) {
                var e = IgxNumericRadiusAxisComponent._createFromInternal(this.i.m2);
                if (e) {
                    e._implementation = this.i.m2;
                }
                this.i.m2.externalObject = e;
            }
            return this.i.m2.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.m2 = null : this.i.m2 = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxRadialBaseComponent.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.nb;
        },
        set: function (v) {
            this.i.nb = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    IgxRadialBaseComponent.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.valueAxis && this.valueAxis._styling) {
            this.valueAxis._styling(container, component, this);
        }
        this._inStyling = false;
    };
    /**
     * Determine if object can be used as ValueAxis
    
    * @param axis  * The object to check
    */
    IgxRadialBaseComponent.prototype.canUseAsValueAxis = function (axis) {
        var iv = this.i.na(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as AngleAxis
    
    * @param axis  * The object to check
    */
    IgxRadialBaseComponent.prototype.canUseAsAngleAxis = function (axis) {
        var iv = this.i.m9(axis);
        return (iv);
    };
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgxRadialBaseComponent.prototype.getItem = function (world) {
        var iv = this.i.fp(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
    */
    IgxRadialBaseComponent.prototype.getAngleFromWorld = function (world) {
        var iv = this.i.nd(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.
    */
    IgxRadialBaseComponent.prototype.getExactItemIndex = function (world) {
        var iv = this.i.ne(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.
    */
    IgxRadialBaseComponent.prototype.getItemIndex = function (world) {
        var iv = this.i.e8(toPoint(world));
        return (iv);
    };
    /**
     * Scrolls the specified item into the view.
    
    * @param item  * The item to scroll into view.
    */
    IgxRadialBaseComponent.prototype.scrollIntoView = function (item) {
        var iv = this.i.c9(item);
        return (iv);
    };
    /**
     * Returns the offset value for this series if grouped on a category axis.
    
    */
    IgxRadialBaseComponent.prototype.getOffsetValue = function () {
        var iv = this.i.getOffsetValue();
        return (iv);
    };
    /**
     * Returns the width of the category grouping this series is in.
    
    */
    IgxRadialBaseComponent.prototype.getCategoryWidth = function () {
        var iv = this.i.getCategoryWidth();
        return (iv);
    };
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxCategoryAngleAxisComponent),
        tslib_1.__metadata("design:paramtypes", [IgxCategoryAngleAxisComponent])
    ], IgxRadialBaseComponent.prototype, "angleAxis", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxNumericRadiusAxisComponent),
        tslib_1.__metadata("design:paramtypes", [IgxNumericRadiusAxisComponent])
    ], IgxRadialBaseComponent.prototype, "valueAxis", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxRadialBaseComponent.prototype, "clipSeriesToBounds", null);
    return IgxRadialBaseComponent;
}(IgxMarkerSeriesComponent));
export { IgxRadialBaseComponent };
//# sourceMappingURL=igx-radial-base-component.js.map