import { TimeAxisIntervalType_$type } from "./TimeAxisIntervalType";
import { TimeAxisInterval as TimeAxisInterval_internal } from "./TimeAxisInterval";
import { ensureEnum } from "igniteui-react-core/ES5/componentUtil";
/**
 * Settings for an interval on a time axis.
 * Label intervals can be applied to a time axis, which are dynamic, according to the visible range.  During zooming, the visible range of the axis can change, and so a different interval is selected.  The interval selected will be the one with the largest range smaller than the visible range of the axis.
*/
var TimeAxisInterval = /** @class */ (function () {
    function TimeAxisInterval() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    TimeAxisInterval.prototype.createImplementation = function () {
        return new TimeAxisInterval_internal();
    };
    Object.defineProperty(TimeAxisInterval.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    TimeAxisInterval.prototype.onImplementationCreated = function () {
    };
    TimeAxisInterval.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(TimeAxisInterval.prototype, "range", {
        /**
         * The visible axis range at which to apply this interval.
        */
        get: function () {
            return this.i.e;
        },
        set: function (v) {
            this.i.e = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeAxisInterval.prototype, "interval", {
        /**
         * The interval, expressed as a multiple of IntervalType.
        */
        get: function () {
            return this.i.d;
        },
        set: function (v) {
            this.i.d = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeAxisInterval.prototype, "intervalType", {
        /**
         * The unit of time for this interval.
        */
        get: function () {
            return this.i.a;
        },
        set: function (v) {
            this.i.a = ensureEnum(TimeAxisIntervalType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    return TimeAxisInterval;
}());
export { TimeAxisInterval };
