import * as tslib_1 from "tslib";
import { forwardRef, Input } from '@angular/core';
import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component";
import { IgxAxisComponent } from "./igx-axis-component";
import { ensureBool } from "igniteui-angular-core";
/**
 * Represents an category-based horizontal X axis that uses a DateTime scale.
*
* Represents horizontal axis that uses a DateTime scale.
*
* ```html
* <igx-data-chart
*     [dataSource]="data">
*     <igx-time-x-axis
* 		dateTimeMemberPath="date"
* 		#xAxis>
*     </igx-time-x-axis>
* </igx-data-chart>
* ```
*
* ```ts
* let xAxis = new IgxTimeXAxisComponent();
* xAxis.dataTimeMemberPath="date";
* this.chart.axes.add(xAxis);
* ```
*/
export var IgxTimeAxisBaseComponent_PROVIDERS = [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(function () { return IgxTimeAxisBaseComponent; }) }, { provide: IgxAxisComponent, useExisting: forwardRef(function () { return IgxTimeAxisBaseComponent; }) }];
var IgxTimeAxisBaseComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxTimeAxisBaseComponent, _super);
    function IgxTimeAxisBaseComponent() {
        return _super.call(this) || this;
    }
    Object.defineProperty(IgxTimeAxisBaseComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTimeAxisBaseComponent.prototype, "dateTimeMemberPath", {
        /**
         * Gets or sets the DateTime mapping property for the axis.
        *
        * Use `dateTimeMemberPath` property for DateTime mapping with the axis.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data">
        *     <igx-time-x-axis
        * 		dateTimeMemberPath="date"
        * 		#xAxis>
        *     </igx-time-x-axis>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * let xAxis = new IgxTimeXAxisComponent();
        * xAxis.dataTimeMemberPath="date";
        * this.chart.axes.add(xAxis);
        * ```
        */
        get: function () {
            return this.i.dateTimeMemberPath;
        },
        set: function (v) {
            this.i.dateTimeMemberPath = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTimeAxisBaseComponent.prototype, "isDataPreSorted", {
        /**
         * Gets or sets whether the data assigned to the date time axis should be considered pre-sorted by date/time.
        *
        * Use `isDataPreSorted` property to decide if the data assigned to the date time axis should be considered pre-sorted by date/time.
        */
        get: function () {
            return this.i.k2;
        },
        set: function (v) {
            this.i.k2 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTimeAxisBaseComponent.prototype, "actualMinimumValue", {
        /**
         * Gets the coerced minimum value.
        *
        * Use `actualMinimumValue` to get the coerced maximum value.
        */
        get: function () {
            return this.i.actualMinimumValue;
        },
        set: function (v) {
            this.i.actualMinimumValue = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTimeAxisBaseComponent.prototype, "actualMaximumValue", {
        /**
         * Gets the coerced maximum value.
        *
        * Use `actualMaximumValue` to get the  coerced maximum value
        */
        get: function () {
            return this.i.actualMaximumValue;
        },
        set: function (v) {
            this.i.actualMaximumValue = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTimeAxisBaseComponent.prototype, "minimumValue", {
        /**
         * Gets or sets the axis MinimumValue.
        *
        * Use `minimumValue` property for axis minimum value.
        *
        * ```ts
        * this.timeXAxis.maximumValue="2019-12-26";
        * ```
        */
        get: function () {
            return this.i.minimumValue;
        },
        set: function (v) {
            this.i.minimumValue = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTimeAxisBaseComponent.prototype, "maximumValue", {
        /**
         * Gets or sets the axis MaximumValue.
        *
        * Use `maximumValue` property for axis maximum value.
        *
        * ```ts
        * this.timeXAxis.maximumValue="2019-12-26";
        * ```
        */
        get: function () {
            return this.i.maximumValue;
        },
        set: function (v) {
            this.i.maximumValue = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTimeAxisBaseComponent.prototype, "isDateTime", {
        /**
         * Checks if the axis is of date time axis type
        *
        * Use `isDateTime` property to Checks if the axis is of date time axis type.
        *
        * ```ts
        * const isDT = this.timeXAxis.isDateTime;
        * ```
        */
        get: function () {
            return this.i.b5;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTimeAxisBaseComponent.prototype, "isSorting", {
        /**
         * Checks if axis requires sorting of items
        *
        * Use `isSorting` property to Checks if axis requires sorting of items.
        *
        * ```ts
        * const isDT = this.timeXAxis.isDateTime;
        * ```
        */
        get: function () {
            return this.i.cd;
        },
        enumerable: true,
        configurable: true
    });
    IgxTimeAxisBaseComponent.prototype.getItemValue = function (item, memberPathName) {
        var iv = this.i.e4(item, memberPathName);
        return (iv);
    };
    /**
     * Gets the index of the data item with the value nearest the given value.
    
    * @param unscaledValue  * The value to find a value close to.
    */
    IgxTimeAxisBaseComponent.prototype.getIndexClosestToUnscaledValue = function (unscaledValue) {
        var iv = this.i.i$f(unscaledValue);
        return (iv);
    };
    /**
     * Updates the axis when the data has been changed.
    
    */
    IgxTimeAxisBaseComponent.prototype.notifyDataChanged = function () {
        this.i.i$i();
    };
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxTimeAxisBaseComponent.prototype, "dateTimeMemberPath", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxTimeAxisBaseComponent.prototype, "isDataPreSorted", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Date),
        tslib_1.__metadata("design:paramtypes", [Date])
    ], IgxTimeAxisBaseComponent.prototype, "actualMinimumValue", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Date),
        tslib_1.__metadata("design:paramtypes", [Date])
    ], IgxTimeAxisBaseComponent.prototype, "actualMaximumValue", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Date),
        tslib_1.__metadata("design:paramtypes", [Date])
    ], IgxTimeAxisBaseComponent.prototype, "minimumValue", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Date),
        tslib_1.__metadata("design:paramtypes", [Date])
    ], IgxTimeAxisBaseComponent.prototype, "maximumValue", null);
    return IgxTimeAxisBaseComponent;
}(IgxCategoryAxisBaseComponent));
export { IgxTimeAxisBaseComponent };
//# sourceMappingURL=igx-time-axis-base-component.js.map