import * as tslib_1 from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { TimeAxisDisplayType_$type } from "./TimeAxisDisplayType";
import { IgrTimeAxisBase } from "./igr-time-axis-base";
import { CategoryDateTimeXAxis } from "./CategoryDateTimeXAxis";
import { ensureEnum } from "igniteui-react-core";
/**
 * Represents a category-based horizontal X axis that uses a DateTime scale.
*
* `IgrCategoryDateTimeXAxis` class represents a category-based horizontal X axis that uses a DateTime scale.
*
* ```ts
*   <IgrDataChart
*     dataSource={this.state.dataSource}
*     width="700px"
*     height="500px">
*     <IgrTimeXAxis name="xAxis"
* 			label="Time"
* 			dateTimeMemberPath="time" />
*  </IgrDataChart>
* ```
*
* ```ts
* 	this.timeXAxis = new IgrTimeXAxis({name: "timeXAxis"});
* 	this.timeXAxis.title = "Time X Axis";
* 	this.timeXAxis.dataSource = this.financialData;
* 	this.timeXAxis.dateTimeMemberPath = "Time";
* 	this.timeXAxis.label = "Date";
* ```
*/
var IgrCategoryDateTimeXAxis = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgrCategoryDateTimeXAxis, _super);
    function IgrCategoryDateTimeXAxis(props) {
        var _this = _super.call(this, props) || this;
        _this._actualIntervalChange = null;
        _this._actualIntervalChange_wrapped = null;
        _this._actualMinorIntervalChange = null;
        _this._actualMinorIntervalChange_wrapped = null;
        return _this;
    }
    IgrCategoryDateTimeXAxis.prototype.createImplementation = function () {
        return new CategoryDateTimeXAxis();
    };
    Object.defineProperty(IgrCategoryDateTimeXAxis.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryDateTimeXAxis.prototype, "isContinuous", {
        /**
         * Gets if the current axis is a continuous rather than a discrete scale
        */
        get: function () {
            return this.i.b6;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryDateTimeXAxis.prototype, "displayType", {
        /**
         * Gets or sets the axis display type.
         * Continuous display type divides the axis into even intervals, where labels will not necessarily be aligned with data points.
         * Discrete display type will not use a constant interval, but will align each label with its data point.
        *
        * `displayType` property is used for axis display type.
        *
        * Continuous display type divides the axis into even intervals, where labels will not necessarily be aligned with data points. Discrete display type will not use a constant interval, but will align each label with its data point.
        *
        * ```ts
        *   <IgrDataChart
        *     dataSource={this.state.dataSource}
        *     width="700px"
        *     height="500px">
        *     <IgrTimeXAxis name="xAxis" label="Date"
        * 			dateTimeMemberPath="Date"
        * 			displayType ="continuous" />
        *  </IgrDataChart>
        * ```
        *
        * ```ts
        * this.timeXAxis = new IgrTimeXAxis({name: "timeXAxis"});
        * this.xAxis.dataTimeMemberPath="date";
        * this.xAxis.displayType ="continuous"
        * ```
        */
        get: function () {
            return this.i.md;
        },
        set: function (v) {
            this.i.md = ensureEnum(TimeAxisDisplayType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryDateTimeXAxis.prototype, "interval", {
        /**
         * Gets or sets the X axis time interval.
        *
        * `interval` property is used to get/sets the frequency of displayed labels.
        *
        * ```ts
        *   <IgrDataChart
        *     dataSource={this.state.dataSource}
        * 		width="700px"
        * 		height="500px">
        *     <IgrTimeXAxis name="xAxis"
        * 		label="Date"
        * 		interval={2}
        * 		dateTimeMemberPath="Date" />
        *  </IgrDataChart>
        * ```
        *
        * ```ts
        * this.timeXAxis = new IgrTimeXAxis({name: "timeXAxis"});
        * This.xAxis.dataTimeMemberPath="date";
        * this.xAxis.interval=2 ;
        * ```
        */
        get: function () {
            return this.i.mn;
        },
        set: function (v) {
            this.i.mn = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryDateTimeXAxis.prototype, "actualInterval", {
        /**
         * Gets the effective value for the current Interval.
        */
        get: function () {
            return this.i.mk;
        },
        set: function (v) {
            this.i.mk = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryDateTimeXAxis.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.
        */
        get: function () {
            return this.i.mo;
        },
        set: function (v) {
            this.i.mo = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryDateTimeXAxis.prototype, "actualMinorInterval", {
        /**
         * Gets the effective value for the current MinorInterval.
        */
        get: function () {
            return this.i.ml;
        },
        set: function (v) {
            this.i.ml = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryDateTimeXAxis.prototype, "isCategoryDateTime", {
        /**
         * Gets if the current axis is of category date time axis type
        */
        get: function () {
            return this.i.b5;
        },
        enumerable: true,
        configurable: true
    });
    IgrCategoryDateTimeXAxis.prototype.scrollIntoView = function (minimum, maximum) {
        this.i.mu(minimum, maximum);
    };
    Object.defineProperty(IgrCategoryDateTimeXAxis.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(IgrCategoryDateTimeXAxis.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 IgrCategoryDateTimeXAxis;
}(IgrTimeAxisBase));
export { IgrCategoryDateTimeXAxis };
//# sourceMappingURL=igr-category-date-time-x-axis.js.map
