import { HighlightingState_$type } from "./HighlightingState";
import { HighlightingInfo as HighlightingInfo_internal } from "./HighlightingInfo";
import { ensureEnum, ensureBool } from "./componentUtil";
/**
 * Contains contextual information about a highlighting.
*/
var IgcHighlightingInfo = /** @class */ /*@__PURE__*/ (function () {
    function IgcHighlightingInfo() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
        if (this._initializeAdapters) {
            this._initializeAdapters();
        }
    }
    IgcHighlightingInfo.prototype.createImplementation = function () {
        return new HighlightingInfo_internal();
    };
    Object.defineProperty(IgcHighlightingInfo.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    IgcHighlightingInfo.prototype.onImplementationCreated = function () {
    };
    IgcHighlightingInfo.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
        if (this._initializeAdapters) {
            this._initializeAdapters();
        }
    };
    Object.defineProperty(IgcHighlightingInfo.prototype, "startIndex", {
        /**
         * The index of the first highlighted item.
        *
        * You can use `StartIndex` to get or set the first highlighted item for the series.
        */
        get: function () {
            return this.i.g;
        },
        set: function (v) {
            this.i.g = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgcHighlightingInfo.prototype, "endIndex", {
        /**
         * The index of the last highlighted item.
        *
        * You can use the `EndIndex` to get or set the last highlighted item for the series.
        */
        get: function () {
            return this.i.f;
        },
        set: function (v) {
            this.i.f = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgcHighlightingInfo.prototype, "state", {
        /**
         * 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: function () {
            return this.i.a;
        },
        set: function (v) {
            this.i.a = ensureEnum(HighlightingState_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgcHighlightingInfo.prototype, "progress", {
        /**
         * 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: function () {
            return this.i.e;
        },
        set: function (v) {
            this.i.e = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgcHighlightingInfo.prototype, "isMarker", {
        /**
         * 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: function () {
            return this.i.d;
        },
        set: function (v) {
            this.i.d = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgcHighlightingInfo.prototype, "isFullRange", {
        /**
         * True if this HighlightingInfo represents a full selection of the data.
        */
        get: function () {
            return this.i.c;
        },
        set: function (v) {
            this.i.c = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgcHighlightingInfo.prototype, "isExclusive", {
        /**
         * TODO
        */
        get: function () {
            return this.i.b;
        },
        set: function (v) {
            this.i.b = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgcHighlightingInfo.prototype, "context", {
        /**
         * The context for the highlight.
        */
        get: function () {
            return this.i.i;
        },
        set: function (v) {
            this.i.i = v;
        },
        enumerable: false,
        configurable: true
    });
    IgcHighlightingInfo.prototype.findByName = function (name) {
        if (this.findEphemera) {
            if (name && name.indexOf("@@e:") == 0) {
                return this.findEphemera(name);
            }
        }
        return null;
    };
    return IgcHighlightingInfo;
}());
export { IgcHighlightingInfo };
