import * as tslib_1 from "tslib";
import { EventEmitter, Output, forwardRef, Input } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core/ES5/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/ES5/componentUtil";
/**
 * Represents the base class for IgxDataChartComponent category series.
*/
export var IgxCategorySeriesComponent_PROVIDERS = [{ provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxCategorySeriesComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxCategorySeriesComponent; }) }];
var IgxCategorySeriesComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxCategorySeriesComponent, _super);
    function IgxCategorySeriesComponent() {
        var _this = _super.call(this) || this;
        _this._assigningCategoryStyle = null;
        _this._assigningCategoryMarkerStyle = null;
        return _this;
    }
    Object.defineProperty(IgxCategorySeriesComponent.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategorySeriesComponent.prototype, "isCategory", {
        /**
         * Gets whether or not this series is Category series
        */
        get: function () {
            return this.i.cl;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategorySeriesComponent.prototype, "isCustomCategoryStyleAllowed", {
        /**
         * Gets or sets whether this category series should allow custom style overrides of its individual visuals.
        */
        get: function () {
            return this.i.np;
        },
        set: function (v) {
            this.i.np = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategorySeriesComponent.prototype, "isCustomCategoryMarkerStyleAllowed", {
        /**
         * Gets or sets whether this category series should allow custom style overrides of its individual marker visuals.
        */
        get: function () {
            return this.i.no;
        },
        set: function (v) {
            this.i.no = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategorySeriesComponent.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.
        *
        * ```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>
        * ```
        */
        get: function () {
            return this.i.nu;
        },
        set: function (v) {
            this.i.nu = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategorySeriesComponent.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.
        *
        * ```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>
        * ```
        */
        get: function () {
            return this.i.m9;
        },
        set: function (v) {
            this.i.m9 = ensureEnum(CategoryTransitionInMode_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategorySeriesComponent.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.
        *
        * ```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>
        * ```
        */
        get: function () {
            return this.i.nq;
        },
        set: function (v) {
            this.i.nq = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Returns the offset value for this series if grouped on a category axis.
    
    */
    IgxCategorySeriesComponent.prototype.getOffsetValue = function () {
        var iv = this.i.getOffsetValue();
        return (iv);
    };
    /**
     * Returns the width of the category grouping this series is in.
    
    */
    IgxCategorySeriesComponent.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.
    */
    IgxCategorySeriesComponent.prototype.getItem = function (world) {
        var iv = this.i.fm(toPoint(world));
        return (iv);
    };
    /**
     * Gets the index of the item based on world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgxCategorySeriesComponent.prototype.getItemIndex = function (world) {
        var iv = this.i.e5(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.
    */
    IgxCategorySeriesComponent.prototype.getExactItemIndex = function (world) {
        var iv = this.i.d8(toPoint(world));
        return (iv);
    };
    Object.defineProperty(IgxCategorySeriesComponent.prototype, "assigningCategoryStyle", {
        /**
         * Event raised when Assigning Category Style
        */
        get: function () {
            var _this = this;
            if (this._assigningCategoryStyle == null) {
                this._assigningCategoryStyle = new EventEmitter();
                this.i.assigningCategoryStyle = delegateCombine(this.i.assigningCategoryStyle, function (o, e) {
                    var outerArgs = new AssigningCategoryStyleEventArgs();
                    outerArgs._provideImplementation(e);
                    if (_this.beforeAssigningCategoryStyle) {
                        _this.beforeAssigningCategoryStyle(_this, outerArgs);
                    }
                    _this._assigningCategoryStyle.emit({
                        sender: _this,
                        args: outerArgs
                    });
                });
            }
            return this._assigningCategoryStyle;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCategorySeriesComponent.prototype, "assigningCategoryMarkerStyle", {
        /**
         * Event raised when Assigning Category Marker Style
        */
        get: function () {
            var _this = this;
            if (this._assigningCategoryMarkerStyle == null) {
                this._assigningCategoryMarkerStyle = new EventEmitter();
                this.i.assigningCategoryMarkerStyle = delegateCombine(this.i.assigningCategoryMarkerStyle, function (o, e) {
                    var outerArgs = new AssigningCategoryMarkerStyleEventArgs();
                    outerArgs._provideImplementation(e);
                    if (_this.beforeAssigningCategoryMarkerStyle) {
                        _this.beforeAssigningCategoryMarkerStyle(_this, outerArgs);
                    }
                    _this._assigningCategoryMarkerStyle.emit({
                        sender: _this,
                        args: outerArgs
                    });
                });
            }
            return this._assigningCategoryMarkerStyle;
        },
        enumerable: true,
        configurable: true
    });
    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);
    return IgxCategorySeriesComponent;
}(IgxMarkerSeriesComponent));
export { IgxCategorySeriesComponent };
//# sourceMappingURL=igx-category-series-component.js.map