import { EventEmitter, Output, Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { AxisAngleLabelMode_$type } from "./AxisAngleLabelMode";
import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component";
import { IgxAxisComponent } from "./igx-axis-component";
import { CategoryAngleAxis } from "./CategoryAngleAxis";
import { ensureEnum } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents a IgxDataChartComponent category angle axis. Useful for displaying radial categories.
*
* `CategoryAngleAxis` represents a IgxDataChartComponent category angle axis. Useful for displaying radial categories
*
* ```html
* <igx-data-chart
*     [dataSource]="dataSource"   >
*     <igx-category-angle-axis name="angleAxis" label="Department" />
*     <igx-numeric-radius-axis name="radiusAxis" />
*  </igx-data-chart>
* ```
*/
export let IgxCategoryAngleAxisComponent = /*@__PURE__*/ (() => {
    class IgxCategoryAngleAxisComponent extends IgxCategoryAxisBaseComponent {
        constructor() {
            super();
            this._actualIntervalChange = null;
        }
        createImplementation() {
            return new CategoryAngleAxis();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Checks if the axis is of angular type
        */
        get isAngular() {
            return this.i.b9;
        }
        /**
         * Indicates the angle in degress that the chart's 0th angle should be offset.
        *
        * Indicates the angle in degress that the chart's 0th angle should be offset.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="dataSource"   >
        *     <igx-category-angle-axis name="angleAxis" startAngleOffset=30/>
        *     <igx-numeric-radius-axis name="radiusAxis" />
        *  </igx-data-chart>
        * ```
        */
        get startAngleOffset() {
            return this.i.ne;
        }
        set startAngleOffset(v) {
            this.i.ne = +v;
        }
        /**
         * Indicates the mode axis labels will operate in.
        */
        get labelMode() {
            return this.i.ml;
        }
        set labelMode(v) {
            this.i.ml = ensureEnum(AxisAngleLabelMode_$type, v);
        }
        get areGroupSizesUneven() {
            return this.i.mv;
        }
        /**
         * Gets or sets the frequency of displayed labels.
         * The set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label.
        *
        * Gets or sets the frequency of displayed labels.The set value is a factor that determines which labels will be hidden.
        * For example, an interval of 2 will display every other label.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="dataSource"   >
        *     <igx-category-angle-axis name="angleAxis" interval =2 />
        *     <igx-numeric-radius-axis name="radiusAxis" />
        *  </igx-data-chart>
        * ```
        */
        get interval() {
            return this.i.nb;
        }
        set interval(v) {
            this.i.nb = +v;
        }
        /**
         * Gets the effective value for the current Interval.
        *
        * Gets the effective value for the current Interval.
        */
        get actualInterval() {
            return this.i.m3;
        }
        set actualInterval(v) {
            this.i.m3 = +v;
        }
        /**
         * Gets or sets the frequency of displayed minor lines.
         * The set value is a factor that determines how the minor lines will be displayed.
        *
        * Gets or sets the frequency of displayed minor lines. The set value is a factor that determines how the minor lines will be displayed.
        */
        get minorInterval() {
            return this.i.nc;
        }
        set minorInterval(v) {
            this.i.nc = +v;
        }
        /**
         * Gets the effective value for the current MinorInterval.
        *
        * Get the effective value for the current minorInterval.
        */
        get actualMinorInterval() {
            return this.i.m4;
        }
        set actualMinorInterval(v) {
            this.i.m4 = +v;
        }
        /**
         * Gets the scaled angle in radians from the raw axis value.
        
        * @param unscaledAngle  * The raw axis value.
        */
        getScaledAngle(unscaledAngle) {
            let iv = this.i.getScaledAngle(unscaledAngle);
            return (iv);
        }
        /**
         * Gets the raw axis value from the scaled angle in radians.
        
        */
        getUnscaledAngle(scaledAngle) {
            let iv = this.i.getUnscaledAngle(scaledAngle);
            return (iv);
        }
        get actualIntervalChange() {
            if (this._actualIntervalChange == null) {
                this._actualIntervalChange = new EventEmitter();
                this.i.propertyChanged = delegateCombine(this.i.propertyChanged, (o, e) => {
                    let iv = e;
                    let ext = this.actualInterval;
                    if (this.beforeActualIntervalChange) {
                        this.beforeActualIntervalChange(this, ext);
                    }
                    this._actualIntervalChange.emit(ext);
                });
            }
            return this._actualIntervalChange;
        }
    }
    IgxCategoryAngleAxisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryAngleAxisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxCategoryAngleAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxCategoryAngleAxisComponent, selector: "igx-category-angle-axis", inputs: { startAngleOffset: "startAngleOffset", labelMode: "labelMode", interval: "interval", actualInterval: "actualInterval", minorInterval: "minorInterval", actualMinorInterval: "actualMinorInterval" }, outputs: { actualIntervalChange: "actualIntervalChange" }, providers: [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(() => IgxCategoryAngleAxisComponent) }, { provide: IgxAxisComponent, useExisting: forwardRef(() => IgxCategoryAngleAxisComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxCategoryAngleAxisComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryAngleAxisComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-category-angle-axis',
                    template: ``,
                    providers: [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(() => IgxCategoryAngleAxisComponent) }, { provide: IgxAxisComponent, useExisting: forwardRef(() => IgxCategoryAngleAxisComponent) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { startAngleOffset: [{
                type: Input
            }], labelMode: [{
                type: Input
            }], interval: [{
                type: Input
            }], actualInterval: [{
                type: Input
            }], minorInterval: [{
                type: Input
            }], actualMinorInterval: [{
                type: Input
            }], actualIntervalChange: [{
                type: Output
            }] } });
