import { TimeAxisIntervalType_$type } from "./TimeAxisIntervalType";
import { TimeAxisInterval as TimeAxisInterval_internal } from "./TimeAxisInterval";
import { ensureEnum } from "igniteui-react-core/ES2015/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.
*/
export class TimeAxisInterval {
    createImplementation() {
        return new TimeAxisInterval_internal();
    }
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    constructor() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    _provideImplementation(i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    /**
     * The visible axis range at which to apply this interval.
    */
    get range() {
        return this.i.e;
    }
    set range(v) {
        this.i.e = +v;
    }
    /**
     * The interval, expressed as a multiple of IntervalType.
    */
    get interval() {
        return this.i.d;
    }
    set interval(v) {
        this.i.d = +v;
    }
    /**
     * The unit of time for this interval.
    */
    get intervalType() {
        return this.i.a;
    }
    set intervalType(v) {
        this.i.a = ensureEnum(TimeAxisIntervalType_$type, v);
    }
}
