import { HighlightingState_$type } from "./HighlightingState";
import { HighlightingInfo as HighlightingInfo_internal } from "./HighlightingInfo";
import { ensureEnum, ensureBool } from "igniteui-react-core/ES2015/componentUtil";
/**
 * Contains contextual information about a highlighting.
*/
export class HighlightingInfo {
    createImplementation() {
        return new HighlightingInfo_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 index of the first highlighted item.
    */
    get startIndex() {
        return this.i.f;
    }
    set startIndex(v) {
        this.i.f = +v;
    }
    /**
     * The index of the last highlighted item.
    */
    get endIndex() {
        return this.i.e;
    }
    set endIndex(v) {
        this.i.e = +v;
    }
    /**
     * The state of the highlighting.
    */
    get state() {
        return this.i.a;
    }
    set state(v) {
        this.i.a = ensureEnum(HighlightingState_$type, v);
    }
    /**
     * A number between 0 and 1 representing the progress of the highlighting.
    */
    get progress() {
        return this.i.d;
    }
    set progress(v) {
        this.i.d = +v;
    }
    /**
     * True if this HighlightingInfo represents a marker highlighting.
    */
    get isMarker() {
        return this.i.c;
    }
    set isMarker(v) {
        this.i.c = ensureBool(v);
    }
    /**
     * The series in context.
    */
    get series() {
        if (this.i.b == null) {
            return null;
        }
        return this.i.b.externalObject;
    }
}
