import { HighlightingState_$type } from "./HighlightingState";
import { IgrSeries } from "./igr-series";
import { HighlightingInfo as HighlightingInfo_internal } from "./HighlightingInfo";
import { ensureEnum, ensureBool } from "igniteui-react-core";
/**
 * Contains contextual information about a highlighting.
*/
export class IgrHighlightingInfo {
    createImplementation() {
        return new HighlightingInfo_internal();
    }
    /**
     * @hidden
     */
    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.
    *
    * You can use `startIndex` to get or set the first highlighted item for the series.
    */
    get startIndex() {
        return this.i.h;
    }
    set startIndex(v) {
        this.i.h = +v;
    }
    /**
     * The index of the last highlighted item.
    *
    * You can use the `endIndex` to get or set the last highlighted item for the series.
    */
    get endIndex() {
        return this.i.g;
    }
    set endIndex(v) {
        this.i.g = +v;
    }
    /**
     * The state of the highlighting.
    *
    * You can use the `state` to get or set the transitioning state of the highlighting, between In, Out, or Static.
    */
    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.
    *
    * You can use the `progress` property to set a number between 0 and 1 representing the progress of the highlighting.
    */
    get progress() {
        return this.i.f;
    }
    set progress(v) {
        this.i.f = +v;
    }
    /**
     * True if this HighlightingInfo represents a marker highlighting.
    *
    * You can set the `isMarker` to True if the HighlightingInfo represents a marker highlighting. Otherwise set to false.
    */
    get isMarker() {
        return this.i.e;
    }
    set isMarker(v) {
        this.i.e = ensureBool(v);
    }
    /**
     * True if this HighlightingInfo represents a full selection of the data.
    */
    get isFullRange() {
        return this.i.d;
    }
    set isFullRange(v) {
        this.i.d = ensureBool(v);
    }
    get isExclusive() {
        return this.i.c;
    }
    set isExclusive(v) {
        this.i.c = ensureBool(v);
    }
    /**
     * The series in context.
    *
    * You can use the `series` property to get the series in context.
    */
    get series() {
        if (this.i.b == null) {
            return null;
        }
        if (!this.i.b.externalObject) {
            let e = IgrSeries._createFromInternal(this.i.b);
            if (e) {
                e._implementation = this.i.b;
            }
            this.i.b.externalObject = e;
        }
        return this.i.b.externalObject;
    }
    set series(v) {
        v == null ? this.i.b = null : this.i.b = v.i;
    }
    findByName(name) {
        if (this.series && this.series.name && this.series.name == name) {
            return this.series;
        }
        return null;
    }
}
//# sourceMappingURL=igr-highlighting-info.js.map
