import { __extends } from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { IgrAssigningCategoryStyleEventArgs } from "./igr-assigning-category-style-event-args";
import { IgrAssigningCategoryMarkerStyleEventArgs } from "./igr-assigning-category-marker-style-event-args";
import { IgrMarkerSeries } from "./igr-marker-series";
import { ensureBool, ensureEnum, toPoint } from "igniteui-react-core";
/**
 * Represents the base class for IgxDataChartComponent category series.
*
* `CategorySeries` class represents the base class for IgxDataChartComponent category series.
*
* ```ts
*  <IgrDataChart
*     dataSource={this.state.dataSource} >
*
*     <IgrCategoryXAxis name="xAxis" />
*     <IgrNumericYAxis name="yAxis" />
*
*     <IgrColumnSeries
*      name="series1"
*     xAxisName="xAxis"
* 	yAxisName="yAxis"
* 	valueMemberPath="Value"/>
*  </IgrDataChart>
* ```
*
* ```ts
* this.columnSeries2 = new IgrColumnSeries({ name: "colSeries2" });
* this.columnSeries2.dataSource = this.categoryData;
* this.columnSeries2.xAxis = this.categoryXAxis;
* this.columnSeries2.yAxis = this.numericYAxis;
* this.columnSeries2.xAxisName = "categoryXAxis";
* this.columnSeries2.yAxisName = "numericYAxis";
* this.columnSeries2.valueMemberPath = "RUS";
* ```
*/
var IgrCategorySeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgrCategorySeries, _super);
    function IgrCategorySeries(props) {
        var _this = _super.call(this, props) || this;
        _this._assigningCategoryStyle = null;
        _this._assigningCategoryStyle_wrapped = null;
        _this._assigningCategoryMarkerStyle = null;
        _this._assigningCategoryMarkerStyle_wrapped = null;
        return _this;
    }
    Object.defineProperty(IgrCategorySeries.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategorySeries.prototype, "hasValueAxis", {
        get: function () {
            return this.i.dz;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategorySeries.prototype, "isValueAxisInverted", {
        get: function () {
            return this.i.fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategorySeries.prototype, "isCategory", {
        /**
         * Gets whether or not this series is Category series
        */
        get: function () {
            return this.i.ec;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategorySeries.prototype, "isCustomCategoryStyleAllowed", {
        /**
         * Gets or sets whether this category series should allow custom style overrides of its individual visuals.
        */
        get: function () {
            return this.i.wc;
        },
        set: function (v) {
            this.i.wc = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategorySeries.prototype, "isCustomCategoryMarkerStyleAllowed", {
        /**
         * Gets or sets whether this category series should allow custom style overrides of its individual marker visuals.
        */
        get: function () {
            return this.i.wb;
        },
        set: function (v) {
            this.i.wb = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategorySeries.prototype, "useHighMarkerFidelity", {
        /**
         * Sets or Gets whether to increase marker fidelity for extreme data shapes that have lots of Y variation over short X intervals.
        *
        * Set `UseHighMarkerFidelity` when your data has high variation along the y-axis within a short span of this x-axis.
        *
        * ```ts
        *  <IgrDataChart
        *     dataSource={this.state.dataSource} >
        *
        *     <IgrCategoryXAxis name="xAxis" />
        *     <IgrNumericYAxis name="yAxis" />
        *
        *     <IgrColumnSeries
        *      name="series1"
        *     xAxisName="xAxis"
        * 	yAxisName="yAxis"
        * 	valueMemberPath="Value"
        * 	useHighMarkerFidelity="true"/>
        *  </IgrDataChart>
        * ```
        *
        * ```ts
        *       this.columnSeries2.useHighMarkerFidelity= "true";
        * ```
        */
        get: function () {
            return this.i.wi;
        },
        set: function (v) {
            this.i.wi = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategorySeries.prototype, "transitionInMode", {
        /**
         * Gets or sets the method by which to animate the data into the chart when the chart data source is swapped.
         * Note: Transitions are not currently supported for stacked series.
        *
        * `TransitionInMode` controls the direction of the transition-in animation.
        *
        * ```ts
        *  <IgrDataChart
        *     dataSource={this.state.dataSource} >
        *
        *     <IgrCategoryXAxis name="xAxis" />
        *     <IgrNumericYAxis name="yAxis" />
        *
        *     <IgrColumnSeries
        *      name="series1"
        *     xAxisName="xAxis"
        * 	yAxisName="yAxis"
        * 	valueMemberPath="Value"
        * 	transitionInMode="accordionfromRight"/>
        *  </IgrDataChart>
        * ```
        *
        * ```ts
        *
        * 	this.columnSeries2.transitionInMode= "accordionfromRight";
        * ```
        */
        get: function () {
            return this.i.vx;
        },
        set: function (v) {
            this.i.vx = ensureEnum(CategoryTransitionInMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategorySeries.prototype, "isTransitionInEnabled", {
        /**
         * Gets or sets whether the series should transition into the plot area when a new data source is assigned.
         * Note: Transitions are not currently supported for stacked series.
        *
        * Set `IsTransitionInEnabled` to true if you want your chart series to animate into position when the chart is loading into view.
        *
        * ```ts
        * this.columnSeries2 = new IgrColumnSeries({ name: "colSeries2" });
        * this.columnSeries2.dataSource = this.categoryData;
        * this.columnSeries2.xAxis = this.categoryXAxis;
        * this.columnSeries2.yAxis = this.numericYAxis;
        * this.columnSeries2.xAxisName = "categoryXAxis";
        * this.columnSeries2.yAxisName = "numericYAxis";
        * this.columnSeries2.valueMemberPath = "RUS";
        * this.columnSeries2.isTransitionInEnabled= "true";
        * ```
        *
        * ```ts
        *  <IgrDataChart
        *     dataSource={this.state.dataSource} >
        *
        *     <IgrCategoryXAxis name="xAxis" />
        *     <IgrNumericYAxis name="yAxis" />
        *
        *     <IgrColumnSeries
        *      name="series1"
        *     xAxisName="xAxis"
        * 	yAxisName="yAxis"
        * 	valueMemberPath="Value"
        * 	isTransitionInEnabled="true"/>
        *  </IgrDataChart>
        * ```
        */
        get: function () {
            return this.i.wd;
        },
        set: function (v) {
            this.i.wd = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Returns the offset value for this series if grouped on a category axis.
    
    */
    IgrCategorySeries.prototype.getOffsetValue = function () {
        var iv = this.i.getOffsetValue();
        return (iv);
    };
    /**
     * Returns the width of the category grouping this series is in.
    
    */
    IgrCategorySeries.prototype.getCategoryWidth = function () {
        var iv = this.i.getCategoryWidth();
        return (iv);
    };
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgrCategorySeries.prototype.getItem = function (world) {
        var iv = this.i.jr(toPoint(world));
        return (iv);
    };
    /**
     * Gets the index of the item based on world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgrCategorySeries.prototype.getItemIndex = function (world) {
        var iv = this.i.i8(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.
    */
    IgrCategorySeries.prototype.getExactItemIndex = function (world) {
        var iv = this.i.hv(toPoint(world));
        return (iv);
    };
    Object.defineProperty(IgrCategorySeries.prototype, "assigningCategoryStyle", {
        /**
         * Event raised when Assigning Category Style
        */
        get: function () {
            return this._assigningCategoryStyle;
        },
        set: function (ev) {
            var _this = this;
            if (this._assigningCategoryStyle_wrapped !== null) {
                this.i.assigningCategoryStyle = delegateRemove(this.i.assigningCategoryStyle, this._assigningCategoryStyle_wrapped);
                this._assigningCategoryStyle_wrapped = null;
                this._assigningCategoryStyle = null;
            }
            this._assigningCategoryStyle = ev;
            this._assigningCategoryStyle_wrapped = function (o, e) {
                var outerArgs = new IgrAssigningCategoryStyleEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforeAssigningCategoryStyle) {
                    _this.beforeAssigningCategoryStyle(_this, outerArgs);
                }
                if (_this._assigningCategoryStyle) {
                    _this._assigningCategoryStyle(_this, outerArgs);
                }
            };
            this.i.assigningCategoryStyle = delegateCombine(this.i.assigningCategoryStyle, this._assigningCategoryStyle_wrapped);
            ;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrCategorySeries.prototype, "assigningCategoryMarkerStyle", {
        /**
         * Event raised when Assigning Category Marker Style
        */
        get: function () {
            return this._assigningCategoryMarkerStyle;
        },
        set: function (ev) {
            var _this = this;
            if (this._assigningCategoryMarkerStyle_wrapped !== null) {
                this.i.assigningCategoryMarkerStyle = delegateRemove(this.i.assigningCategoryMarkerStyle, this._assigningCategoryMarkerStyle_wrapped);
                this._assigningCategoryMarkerStyle_wrapped = null;
                this._assigningCategoryMarkerStyle = null;
            }
            this._assigningCategoryMarkerStyle = ev;
            this._assigningCategoryMarkerStyle_wrapped = function (o, e) {
                var outerArgs = new IgrAssigningCategoryMarkerStyleEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforeAssigningCategoryMarkerStyle) {
                    _this.beforeAssigningCategoryMarkerStyle(_this, outerArgs);
                }
                if (_this._assigningCategoryMarkerStyle) {
                    _this._assigningCategoryMarkerStyle(_this, outerArgs);
                }
            };
            this.i.assigningCategoryMarkerStyle = delegateCombine(this.i.assigningCategoryMarkerStyle, this._assigningCategoryMarkerStyle_wrapped);
            ;
        },
        enumerable: false,
        configurable: true
    });
    return IgrCategorySeries;
}(IgrMarkerSeries));
export { IgrCategorySeries };
