import { EventEmitter, Output, Component, Input } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { IgxAssigningCategoryStyleEventArgs } from "./igx-assigning-category-style-event-args";
import { IgxAssigningCategoryMarkerStyleEventArgs } from "./igx-assigning-category-marker-style-event-args";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { ensureBool, ensureEnum, toPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * 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 let IgxCategorySeriesComponent = /*@__PURE__*/ (() => {
    class IgxCategorySeriesComponent extends IgxMarkerSeriesComponent {
        constructor() {
            super();
            this._assigningCategoryStyle = null;
            this._assigningCategoryMarkerStyle = null;
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        get hasValueAxis() {
            return this.i.c6;
        }
        get isValueAxisInverted() {
            return this.i.ek;
        }
        /**
         * Gets whether or not this series is Category series
        */
        get isCategory() {
            return this.i.dh;
        }
        /**
         * Gets or sets whether this category series should allow custom style overrides of its individual visuals.
        */
        get isCustomCategoryStyleAllowed() {
            return this.i.sj;
        }
        set isCustomCategoryStyleAllowed(v) {
            this.i.sj = ensureBool(v);
        }
        /**
         * Gets or sets whether this category series should allow custom style overrides of its individual marker visuals.
        */
        get isCustomCategoryMarkerStyleAllowed() {
            return this.i.si;
        }
        set isCustomCategoryMarkerStyleAllowed(v) {
            this.i.si = 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);
        * ```
        *
        * ```ts
        *       this.columnSeries2.useHighMarkerFidelity= "true";
        * ```
        */
        get useHighMarkerFidelity() {
            return this.i.so;
        }
        set useHighMarkerFidelity(v) {
            this.i.so = 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);
        * ```
        *
        * ```ts
        *
        * 	this.columnSeries2.transitionInMode= "accordionfromRight";
        * ```
        */
        get transitionInMode() {
            return this.i.r4;
        }
        set transitionInMode(v) {
            this.i.r4 = 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.sk;
        }
        set isTransitionInEnabled(v) {
            this.i.sk = 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.hv(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.hf(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.f7(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 IgxAssigningCategoryStyleEventArgs();
                    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 IgxAssigningCategoryMarkerStyleEventArgs();
                    outerArgs._provideImplementation(e);
                    if (this.beforeAssigningCategoryMarkerStyle) {
                        this.beforeAssigningCategoryMarkerStyle(this, outerArgs);
                    }
                    this._assigningCategoryMarkerStyle.emit({
                        sender: this,
                        args: outerArgs
                    });
                });
            }
            return this._assigningCategoryMarkerStyle;
        }
    }
    IgxCategorySeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCategorySeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxCategorySeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxCategorySeriesComponent, selector: "ng-component", inputs: { isCustomCategoryStyleAllowed: "isCustomCategoryStyleAllowed", isCustomCategoryMarkerStyleAllowed: "isCustomCategoryMarkerStyleAllowed", useHighMarkerFidelity: "useHighMarkerFidelity", transitionInMode: "transitionInMode", isTransitionInEnabled: "isTransitionInEnabled" }, outputs: { assigningCategoryStyle: "assigningCategoryStyle", assigningCategoryMarkerStyle: "assigningCategoryMarkerStyle" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
    return IgxCategorySeriesComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxCategorySeriesComponent, decorators: [{
            type: Component,
            args: [{
                    template: ``,
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { isCustomCategoryStyleAllowed: [{
                type: Input
            }], isCustomCategoryMarkerStyleAllowed: [{
                type: Input
            }], useHighMarkerFidelity: [{
                type: Input
            }], transitionInMode: [{
                type: Input
            }], isTransitionInEnabled: [{
                type: Input
            }], assigningCategoryStyle: [{
                type: Output
            }], assigningCategoryMarkerStyle: [{
                type: Output
            }] } });
