import * as tslib_1 from "tslib";
import { EventEmitter, Output, forwardRef, Input } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core/ES2015/type";
import { CategoryTransitionInMode, CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { AssigningCategoryStyleEventArgs } from "./igx-assigning-category-style-event-args";
import { AssigningCategoryMarkerStyleEventArgs } from "./igx-assigning-category-marker-style-event-args";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { ensureBool, ensureEnum, toPoint } from "igniteui-angular-core/ES2015/componentUtil";
/**
 * Represents the base class for IgxDataChartComponent category series.
*
* `IgxCategorySeriesComponent` class represents the base class for IgxDataChartComponent category series.
*
* ```html
*     <igx-data-chart [dataSource]="data" >
*       <igx-category-x-axis
*         label="label"
*         #xAxis>
*       </igx-category-x-axis>
*       <igx-numeric-y-axis #yAxis>
*       </igx-numeric-y-axis>
*       <igx-column-series
*         [xAxis]="xAxis"
*         [yAxis]="yAxis"
*         valueMemberPath="value"
*         isTransitionInEnabled="true">
*       </igx-column-series>
*     </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxColumnSeriesComponent();
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.valueMemberPath="value";
* this.chart.series.add(series);
* ```
*/
export const IgxCategorySeriesComponent_PROVIDERS = [{ provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxCategorySeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxCategorySeriesComponent) }];
export class IgxCategorySeriesComponent extends IgxMarkerSeriesComponent {
    constructor() {
        super();
        this._assigningCategoryStyle = null;
        this._assigningCategoryMarkerStyle = null;
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets whether or not this series is Category series
    */
    get isCategory() {
        return this.i.cl;
    }
    /**
     * Gets or sets whether this category series should allow custom style overrides of its individual visuals.
    */
    get isCustomCategoryStyleAllowed() {
        return this.i.nw;
    }
    set isCustomCategoryStyleAllowed(v) {
        this.i.nw = ensureBool(v);
    }
    /**
     * Gets or sets whether this category series should allow custom style overrides of its individual marker visuals.
    */
    get isCustomCategoryMarkerStyleAllowed() {
        return this.i.nv;
    }
    set isCustomCategoryMarkerStyleAllowed(v) {
        this.i.nv = 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.
    *
    * ```html
    * <igx-data-chart [dataSource]="data">
    *     <igx-category-x-axis
    *         label="label"
    *         #xAxis>
    *     </igx-category-x-axis>
    *     <igx-numeric-y-axis #yAxis>
    *     </igx-numeric-y-axis>
    *     <igx-column-series
    *         [xAxis]="xAxis"
    *         [yAxis]="yAxis"
    *         valueMemberPath="value"
    *         markerType="circle"
    *         useHighMarkerFidelity="true">
    *     </igx-column-series>
    * </igx-data-chart>
    * ```
    *
    * ```ts
    * let series = new IgxColumnSeriesComponent();
    * series.xAxis = this.xAxis;
    * series.yAxis = this.yAxis;
    * series.valueMemberPath= "value";
    * series.useHighMarkerFidelity= "true";
    * this.chart.series.add(series);
    * ```
    */
    get useHighMarkerFidelity() {
        return this.i.n1;
    }
    set useHighMarkerFidelity(v) {
        this.i.n1 = 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.
    *
    * ```html
    *     <igx-data-chart
    *       [dataSource]="data" >
    *       <igx-category-x-axis
    *         label="label"
    *         #xAxis>
    *       </igx-category-x-axis>
    *       <igx-numeric-y-axis #yAxis>
    *       </igx-numeric-y-axis>
    *
    *       <igx-column-series
    *         [xAxis]="xAxis"
    *         [yAxis]="yAxis"
    *         valueMemberPath="value"
    *         isTransitionInEnabled="true"
    *         transitionInMode="accordionfromRight">
    *       </igx-column-series>
    *     </igx-data-chart>
    * ```
    *
    * ```ts
    * let series = new IgxColumnSeriesComponent();
    * series.xAxis = this.xAxis;
    * series.yAxis = this.yAxis;
    * series.valueMemberPath="value";
    * series.transitionInMode="accordionfromRight";
    * this.chart.series.add(series);
    * ```
    */
    get transitionInMode() {
        return this.i.ng;
    }
    set transitionInMode(v) {
        this.i.ng = 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.
    *
    * ```html
    *     <igx-data-chart [dataSource]="data" >
    *       <igx-category-x-axis
    *         label="label"
    *         #xAxis>
    *       </igx-category-x-axis>
    *       <igx-numeric-y-axis #yAxis>
    *       </igx-numeric-y-axis>
    *
    *       <igx-column-series
    *         [xAxis]="xAxis"
    *         [yAxis]="yAxis"
    *         valueMemberPath="value"
    *         isTransitionInEnabled="true">
    *       </igx-column-series>
    *     </igx-data-chart>
    * ```
    *
    * ```ts
    * let series = new IgxColumnSeriesComponent();
    * series.xAxis = this.xAxis;
    * series.yAxis = this.yAxis;
    * series.valueMemberPath="value";
    * series.isTransitionInEnabled="true";
    * this.chart.series.add(series);
    * ```
    */
    get isTransitionInEnabled() {
        return this.i.nx;
    }
    set isTransitionInEnabled(v) {
        this.i.nx = 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.fp(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.e8(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.eb(toPoint(world));
        return (iv);
    }
    /**
     * Event raised when Assigning Category Style
    */
    get assigningCategoryStyle() {
        if (this._assigningCategoryStyle == null) {
            this._assigningCategoryStyle = new EventEmitter();
            this.i.assigningCategoryStyle = delegateCombine(this.i.assigningCategoryStyle, (o, e) => {
                let outerArgs = new AssigningCategoryStyleEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeAssigningCategoryStyle) {
                    this.beforeAssigningCategoryStyle(this, outerArgs);
                }
                this._assigningCategoryStyle.emit({
                    sender: this,
                    args: outerArgs
                });
            });
        }
        return this._assigningCategoryStyle;
    }
    /**
     * Event raised when Assigning Category Marker Style
    */
    get assigningCategoryMarkerStyle() {
        if (this._assigningCategoryMarkerStyle == null) {
            this._assigningCategoryMarkerStyle = new EventEmitter();
            this.i.assigningCategoryMarkerStyle = delegateCombine(this.i.assigningCategoryMarkerStyle, (o, e) => {
                let outerArgs = new AssigningCategoryMarkerStyleEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeAssigningCategoryMarkerStyle) {
                    this.beforeAssigningCategoryMarkerStyle(this, outerArgs);
                }
                this._assigningCategoryMarkerStyle.emit({
                    sender: this,
                    args: outerArgs
                });
            });
        }
        return this._assigningCategoryMarkerStyle;
    }
}
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Boolean),
    tslib_1.__metadata("design:paramtypes", [Boolean])
], IgxCategorySeriesComponent.prototype, "isCustomCategoryStyleAllowed", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Boolean),
    tslib_1.__metadata("design:paramtypes", [Boolean])
], IgxCategorySeriesComponent.prototype, "isCustomCategoryMarkerStyleAllowed", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Boolean),
    tslib_1.__metadata("design:paramtypes", [Boolean])
], IgxCategorySeriesComponent.prototype, "useHighMarkerFidelity", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxCategorySeriesComponent.prototype, "transitionInMode", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Boolean),
    tslib_1.__metadata("design:paramtypes", [Boolean])
], IgxCategorySeriesComponent.prototype, "isTransitionInEnabled", null);
tslib_1.__decorate([
    Output(),
    tslib_1.__metadata("design:type", EventEmitter),
    tslib_1.__metadata("design:paramtypes", [])
], IgxCategorySeriesComponent.prototype, "assigningCategoryStyle", null);
tslib_1.__decorate([
    Output(),
    tslib_1.__metadata("design:type", EventEmitter),
    tslib_1.__metadata("design:paramtypes", [])
], IgxCategorySeriesComponent.prototype, "assigningCategoryMarkerStyle", null);
//# sourceMappingURL=igx-category-series-component.js.map