import * as tslib_1 from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { IgrCategoryAxisBase } from "./igr-category-axis-base";
import { CategoryXAxis } from "./CategoryXAxis";
/**
 * Represents a IgxDataChartComponent category X axis.
*
* `IgrCategoryXAxis` class represents a IgxDataChartComponent category X axis.
*
* ```ts
*  <IgrDataChart
*     dataSource={this.state.dataSource} >
*
*     <IgrCategoryXAxis name="xAxis" />
*     <IgrNumericYAxis name="yAxis" />
*
*     <IgrLineSeries
*      name="series1"
*     xAxisName="xAxis"
* 	yAxisName="yAxis"
* 	valueMemberPath="Value"/>
*  </IgrDataChart>
* ```
*
* ```ts
* this.columnSeries1 = new IgrLineSeries({ name: "Series1" });
* this.columnSeries1.dataSource = this.categoryData;
* this.columnSeries1.xAxis = this.categoryXAxis;
* this.columnSeries1.yAxis = this.numericYAxis;
* this.columnSeries1.xAxisName = "categoryXAxis";
* this.columnSeries1.yAxisName = "numericYAxis";
* this.columnSeries1.valueMemberPath = "USA";
* ```
*/
var IgrCategoryXAxis = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgrCategoryXAxis, _super);
    function IgrCategoryXAxis(props) {
        var _this = _super.call(this, props) || this;
        _this._actualIntervalChange = null;
        _this._actualIntervalChange_wrapped = null;
        _this._actualMinorIntervalChange = null;
        _this._actualMinorIntervalChange_wrapped = null;
        return _this;
    }
    IgrCategoryXAxis.prototype.createImplementation = function () {
        return new CategoryXAxis();
    };
    Object.defineProperty(IgrCategoryXAxis.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryXAxis.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.
        *
        * ```ts
        *  <IgrDataChart
        *     dataSource={this.state.dataSource} >
        *
        *     <IgrCategoryXAxis name="xAxis" interval="3" />
        *     <IgrNumericYAxis name="yAxis" />
        *
        *     <IgrLineSeries
        *      name="series1"
        *     xAxisName="xAxis"
        * 	yAxisName="yAxis"
        * 	valueMemberPath="Value"/>
        *  </IgrDataChart>
        * ```
        */
        get: function () {
            return this.i.lf;
        },
        set: function (v) {
            this.i.lf = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryXAxis.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: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryXAxis.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.
        *
        * ```ts
        *  <IgrDataChart
        *     dataSource={this.state.dataSource} >
        *
        *     <IgrCategoryXAxis name="xAxis"
        * 		minorInterval={0.1}
        * 		minorStroke="green"
        * 		minorStrokeThickness={1} />
        *     <IgrNumericYAxis name="yAxis" />
        *
        *     <IgrLineSeries
        * 		name="series1"
        * 		xAxisName="xAxis"
        * 		yAxisName="yAxis"
        * 		valueMemberPath="value"/>
        *  </IgrDataChart>
        * ```
        */
        get: function () {
            return this.i.lg;
        },
        set: function (v) {
            this.i.lg = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryXAxis.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: true,
        configurable: true
    });
    /**
     * Scrolls the specified item into view.
    
    * @param item  * Data item to scroll into view
    */
    IgrCategoryXAxis.prototype.scrollIntoView = function (item) {
        this.i.lq(item);
    };
    IgrCategoryXAxis.prototype.scrollRangeIntoView = function (minimum, maximum) {
        this.i.lr(minimum, maximum);
    };
    Object.defineProperty(IgrCategoryXAxis.prototype, "actualIntervalChange", {
        get: function () {
            return this._actualIntervalChange;
        },
        set: function (ev) {
            var _this = this;
            if (this._actualIntervalChange_wrapped !== null) {
                this.i.propertyChanged = delegateRemove(this.i.propertyChanged, this._actualIntervalChange_wrapped);
                this._actualIntervalChange_wrapped = null;
                this._actualIntervalChange = null;
            }
            this._actualIntervalChange = ev;
            this._actualIntervalChange_wrapped = function (o, e) {
                var ext = _this.actualInterval;
                if (_this.beforeActualIntervalChange) {
                    _this.beforeActualIntervalChange(_this, ext);
                }
                if (_this._actualIntervalChange) {
                    _this._actualIntervalChange(_this, ext);
                }
            };
            this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualIntervalChange_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryXAxis.prototype, "actualMinorIntervalChange", {
        get: function () {
            return this._actualMinorIntervalChange;
        },
        set: function (ev) {
            var _this = this;
            if (this._actualMinorIntervalChange_wrapped !== null) {
                this.i.propertyChanged = delegateRemove(this.i.propertyChanged, this._actualMinorIntervalChange_wrapped);
                this._actualMinorIntervalChange_wrapped = null;
                this._actualMinorIntervalChange = null;
            }
            this._actualMinorIntervalChange = ev;
            this._actualMinorIntervalChange_wrapped = function (o, e) {
                var ext = _this.actualMinorInterval;
                if (_this.beforeActualMinorIntervalChange) {
                    _this.beforeActualMinorIntervalChange(_this, ext);
                }
                if (_this._actualMinorIntervalChange) {
                    _this._actualMinorIntervalChange(_this, ext);
                }
            };
            this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualMinorIntervalChange_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    return IgrCategoryXAxis;
}(IgrCategoryAxisBase));
export { IgrCategoryXAxis };
//# sourceMappingURL=igr-category-x-axis.js.map
