import { IgxHighlightingInfo } from "./igx-highlighting-info";
import { TypeRegistrar } from "igniteui-angular-core";
import { brushToString, stringToBrush, ensureBool } from "igniteui-angular-core";
/**
 * Represents event arguments base class for the AssigningCategoryStyleEventArgsBase
*/
var IgxAssigningSeriesStyleEventArgsBase = /** @class */ /*@__PURE__*/ (function () {
    function IgxAssigningSeriesStyleEventArgsBase() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    IgxAssigningSeriesStyleEventArgsBase.prototype.createImplementation = function () {
        return null;
    };
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        } /**
                                     * @hidden
                                     */,
        enumerable: false,
        configurable: true
    });
    IgxAssigningSeriesStyleEventArgsBase._createFromInternal = function (internal) {
        if (!internal) {
            return null;
        }
        if (!internal.$type) {
            return null;
        }
        var name = internal.$type.name;
        var externalName = "Igx" + name + "Component";
        if (!TypeRegistrar.isRegistered(externalName)) {
            return null;
        }
        return TypeRegistrar.create(externalName);
    };
    IgxAssigningSeriesStyleEventArgsBase.prototype.onImplementationCreated = function () {
    };
    IgxAssigningSeriesStyleEventArgsBase.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "startIndex", {
        /**
         * Gets the start index
        */
        get: function () {
            return this.i.o;
        },
        set: function (v) {
            this.i.o = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "endIndex", {
        /**
         * Gets the end index
        */
        get: function () {
            return this.i.n;
        },
        set: function (v) {
            this.i.n = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "startDate", {
        /**
         * Gets the start date, if applicable
        */
        get: function () {
            return this.i.h;
        },
        set: function (v) {
            this.i.h = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "endDate", {
        /**
         * Gets the end date, if applicable
        */
        get: function () {
            return this.i.g;
        },
        set: function (v) {
            this.i.g = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "getItems", {
        /**
         * Gets a function that will return the items associated with this event.
        */
        get: function () {
            return this.i.a;
        },
        set: function (v) {
            this.i.a = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "fill", {
        /**
         * Gets or sets fill brush to use for the current item.
        */
        get: function () {
            return brushToString(this.i.p);
        },
        set: function (v) {
            this.i.p = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "stroke", {
        /**
         * Gets or sets stroke to use for the current item.
        */
        get: function () {
            return brushToString(this.i.q);
        },
        set: function (v) {
            this.i.q = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "opacity", {
        /**
         * Gets or sets opacity to use for the current item.
        */
        get: function () {
            return this.i.k;
        },
        set: function (v) {
            this.i.k = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "fadeOpacity", {
        /**
         * Gets or sets opacity to use for the current item.
        */
        get: function () {
            return this.i.i;
        },
        set: function (v) {
            this.i.i = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "highlightingInfo", {
        /**
         * Gets or sets highlighting info
        */
        get: function () {
            var r = this.i.b;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = new IgxHighlightingInfo();
                if (r.$type) {
                    e._implementation = r;
                }
                else {
                    if (e.i.setNativeElement) {
                        e.i.setNativeElement(r);
                    }
                }
                r.externalObject = e;
            }
            return r.externalObject;
        },
        set: function (v) {
            v == null ? this.i.b = null : this.i.b = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "maxAllSeriesHighlightingProgress", {
        /**
         * Gets the max highlighting progress from all series.
        */
        get: function () {
            return this.i.j;
        },
        set: function (v) {
            this.i.j = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "sumAllSeriesHighlightingProgress", {
        /**
         * Gets the sum of highlighting progress from all series.
        */
        get: function () {
            return this.i.l;
        },
        set: function (v) {
            this.i.l = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "totalAllSeriesHighlightingProgress", {
        /**
         * Gets the average of highlighting progress from all the series.
        */
        get: function () {
            return this.i.m;
        },
        set: function (v) {
            this.i.m = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "highlightingHandled", {
        /**
         * Gets or sets if highlighting was handled by this event handler, and whether internal highlighting logic should be skipped.
        */
        get: function () {
            return this.i.d;
        },
        set: function (v) {
            this.i.d = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "hasDateRange", {
        /**
         * Gets if this event has a valid date range
        */
        get: function () {
            return this.i.c;
        },
        set: function (v) {
            this.i.c = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "isNegativeShape", {
        /**
         * Gets if the current shape is identified as a negative shape if this series supports discrete negative shapes.
        */
        get: function () {
            return this.i.e;
        },
        set: function (v) {
            this.i.e = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxAssigningSeriesStyleEventArgsBase.prototype, "isThumbnail", {
        /**
         * Gets if the current event is being raised for the thumbnail image.
        */
        get: function () {
            return this.i.f;
        },
        set: function (v) {
            this.i.f = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    IgxAssigningSeriesStyleEventArgsBase.prototype.findByName = function (name) {
        if (this.findEphemera) {
            if (name && name.indexOf("@@e:") == 0) {
                return this.findEphemera(name);
            }
        }
        if (this.highlightingInfo && this.highlightingInfo.name && this.highlightingInfo.name == name) {
            return this.highlightingInfo;
        }
        return null;
    };
    return IgxAssigningSeriesStyleEventArgsBase;
}());
export { IgxAssigningSeriesStyleEventArgsBase };
