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.
*
* `IgrCategorySeries` 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";
* ```
*/
export class IgrCategorySeries extends IgrMarkerSeries {
    constructor(props) {
        super(props);
        this._assigningCategoryStyle = null;
        this._assigningCategoryStyle_wrapped = null;
        this._assigningCategoryMarkerStyle = null;
        this._assigningCategoryMarkerStyle_wrapped = null;
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets whether or not this series is Category series
    */
    get isCategory() {
        return this.i.cz;
    }
    /**
     * Gets or sets whether this category series should allow custom style overrides of its individual visuals.
    */
    get isCustomCategoryStyleAllowed() {
        return this.i.qk;
    }
    set isCustomCategoryStyleAllowed(v) {
        this.i.qk = ensureBool(v);
    }
    /**
     * Gets or sets whether this category series should allow custom style overrides of its individual marker visuals.
    */
    get isCustomCategoryMarkerStyleAllowed() {
        return this.i.qj;
    }
    set isCustomCategoryMarkerStyleAllowed(v) {
        this.i.qj = ensureBool(v);
    }
    /**
     * 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 useHighMarkerFidelity() {
        return this.i.qp;
    }
    set useHighMarkerFidelity(v) {
        this.i.qp = ensureBool(v);
    }
    /**
     * 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 transitionInMode() {
        return this.i.p5;
    }
    set transitionInMode(v) {
        this.i.p5 = ensureEnum(CategoryTransitionInMode_$type, v);
    }
    /**
     * 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 isTransitionInEnabled() {
        return this.i.ql;
    }
    set isTransitionInEnabled(v) {
        this.i.ql = ensureBool(v);
    }
    /**
     * Returns the offset value for this series if grouped on a category axis.
    
    */
    getOffsetValue() {
        let iv = this.i.getOffsetValue();
        return (iv);
    }
    /**
     * Returns the width of the category grouping this series is in.
    
    */
    getCategoryWidth() {
        let 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.
    */
    getItem(world) {
        let iv = this.i.gq(toPoint(world));
        return (iv);
    }
    /**
     * Gets the index of the item based on world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    getItemIndex(world) {
        let iv = this.i.f9(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.
    */
    getExactItemIndex(world) {
        let iv = this.i.e4(toPoint(world));
        return (iv);
    }
    /**
     * Event raised when Assigning Category Style
    */
    get assigningCategoryStyle() {
        return this._assigningCategoryStyle;
    }
    set assigningCategoryStyle(ev) {
        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 = (o, e) => {
            let 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);
    }
    /**
     * Event raised when Assigning Category Marker Style
    */
    get assigningCategoryMarkerStyle() {
        return this._assigningCategoryMarkerStyle;
    }
    set assigningCategoryMarkerStyle(ev) {
        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 = (o, e) => {
            let 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);
    }
}
//# sourceMappingURL=igr-category-series.js.map
