import { __extends } from "tslib";
import { EventEmitter, Output, Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component";
import { IgxAxisComponent } from "./igx-axis-component";
import { CategoryXAxis } from "./CategoryXAxis";
import * as i0 from "@angular/core";
/**
 * Represents a IgxDataChartComponent category X axis.
*
* `IgxCategoryXAxisComponent` class represents a IgxDataChartComponent category X axis.
*
* ```html
* <igx-data-chart [dataSource]="data">
*   <igx-category-x-axis #xAxis
*     label="label" >
*   </igx-category-x-axis>
*   <igx-numeric-y-axis #yAxis>
*   </igx-numeric-y-axis>
*   <igx-column-series
*     [xAxis]="xAxis"
*     [yAxis]="yAxis"
*     valueMemberPath="value">
*   </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);
* ```
*/
var IgxCategoryXAxisComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxCategoryXAxisComponent, _super);
    function IgxCategoryXAxisComponent() {
        var _this = _super.call(this) || this;
        _this._actualIntervalChange = null;
        _this._actualMinorIntervalChange = null;
        return _this;
    }
    IgxCategoryXAxisComponent.prototype.createImplementation = function () {
        return new CategoryXAxis();
    };
    Object.defineProperty(IgxCategoryXAxisComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryXAxisComponent.prototype, "interval", {
        /**
         * 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.
        *
        * `interval` determines how often to show a label, tickmark, and/or gridline along the x-axis.  Set this property to _n_ to display a label every _nth_ item.
        *
        * ```html
        * <igx-data-chart [dataSource]="data">
        *   <igx-category-x-axis #xAxis
        *     label="label"
        *     interval="3">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * let series = new IgxColumnSeriesComponent();
        * series.xAxis = this.xAxis;
        * xAxis.interval="3";
        * series.yAxis = this.yAxis;
        *
        * series.valueMemberPath="value";
        * this.chart.series.add(series);
        * ```
        */
        get: function () {
            return this.i.lf;
        },
        set: function (v) {
            this.i.lf = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryXAxisComponent.prototype, "actualInterval", {
        /**
         * Gets the effective value for the current Interval.
        *
        * ```ts
        * let effectiveInterval: number = xAxis.actualInterval;
        * ```
        */
        get: function () {
            return this.i.la;
        },
        set: function (v) {
            this.i.la = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryXAxisComponent.prototype, "minorInterval", {
        /**
         * Gets or sets the frequency of displayed minor lines.
         * The set value is a factor that determines how the minor lines will be displayed.
        *
        * `minorInterval` determines how often to show a minor gridline along the x-axis.  This property is relevant only when the displayed series is a type with grouping, like column series.
        *
        * `minorInterval` is expressed as a number between 0 and 1, representing the frequency of the interval.  To display minor gridlines representing 10ths of an item width, set `minorInterval` to 0.1.
        *
        * ```html
        * <igx-data-chart [dataSource]="data">
        *   <igx-category-x-axis #xAxis
        *     label="label"
        *     minorInterval="0.1"
        *     minorStroke="green"
        *     minorStrokeThickness="1">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * let series = new IgxColumnSeriesComponent();
        * series.xAxis = this.xAxis;
        * xAxis.minorInterval="0.1";
        * series.yAxis = this.yAxis;
        * series.valueMemberPath="value";
        * this.chart.series.add(series);
        * ```
        */
        get: function () {
            return this.i.lg;
        },
        set: function (v) {
            this.i.lg = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryXAxisComponent.prototype, "actualMinorInterval", {
        /**
         * Gets the effective value for the current MinorInterval.
        *
        * ```ts
        * let effectiveMinorInterval: number = xAxis.actualMinorInterval;
        * ```
        */
        get: function () {
            return this.i.lb;
        },
        set: function (v) {
            this.i.lb = +v;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Scrolls the specified item into view.
    
    * @param item  * Data item to scroll into view
    */
    IgxCategoryXAxisComponent.prototype.scrollIntoView = function (item) {
        this.i.lq(item);
    };
    IgxCategoryXAxisComponent.prototype.scrollRangeIntoView = function (minimum, maximum) {
        this.i.lr(minimum, maximum);
    };
    Object.defineProperty(IgxCategoryXAxisComponent.prototype, "actualIntervalChange", {
        get: function () {
            var _this = this;
            if (this._actualIntervalChange == null) {
                this._actualIntervalChange = new EventEmitter();
                this.i.propertyChanged = delegateCombine(this.i.propertyChanged, function (o, e) {
                    var iv = e;
                    var ext = _this.actualInterval;
                    if (_this.beforeActualIntervalChange) {
                        _this.beforeActualIntervalChange(_this, ext);
                    }
                    _this._actualIntervalChange.emit(ext);
                });
            }
            return this._actualIntervalChange;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxCategoryXAxisComponent.prototype, "actualMinorIntervalChange", {
        get: function () {
            var _this = this;
            if (this._actualMinorIntervalChange == null) {
                this._actualMinorIntervalChange = new EventEmitter();
                this.i.propertyChanged = delegateCombine(this.i.propertyChanged, function (o, e) {
                    var iv = e;
                    var ext = _this.actualMinorInterval;
                    if (_this.beforeActualMinorIntervalChange) {
                        _this.beforeActualMinorIntervalChange(_this, ext);
                    }
                    _this._actualMinorIntervalChange.emit(ext);
                });
            }
            return this._actualMinorIntervalChange;
        },
        enumerable: false,
        configurable: true
    });
    IgxCategoryXAxisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IgxCategoryXAxisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxCategoryXAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: IgxCategoryXAxisComponent, selector: "igx-category-x-axis", inputs: { interval: "interval", actualInterval: "actualInterval", minorInterval: "minorInterval", actualMinorInterval: "actualMinorInterval" }, outputs: { actualIntervalChange: "actualIntervalChange", actualMinorIntervalChange: "actualMinorIntervalChange" }, providers: [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(function () { return IgxCategoryXAxisComponent; }) }, { provide: IgxAxisComponent, useExisting: forwardRef(function () { return IgxCategoryXAxisComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxCategoryXAxisComponent;
}(IgxCategoryAxisBaseComponent));
export { IgxCategoryXAxisComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IgxCategoryXAxisComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-category-x-axis',
                    template: "",
                    providers: [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(function () { return IgxCategoryXAxisComponent; }) }, { provide: IgxAxisComponent, useExisting: forwardRef(function () { return IgxCategoryXAxisComponent; }) }],
                    changeDetection: ChangeDetectionStrategy.OnPush
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { interval: [{
                type: Input
            }], actualInterval: [{
                type: Input
            }], minorInterval: [{
                type: Input
            }], actualMinorInterval: [{
                type: Input
            }], actualIntervalChange: [{
                type: Output
            }], actualMinorIntervalChange: [{
                type: Output
            }] } });
//# sourceMappingURL=igx-category-x-axis-component.js.map
