/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { Base, typeCast, runOn, fromEnum, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs } from "igniteui-react-core";
import { DomWrapper_$type } from "igniteui-react-core";
import { Dictionary$2 } from "igniteui-react-core";
import { RenderingContext } from "igniteui-react-core";
import { LegendItemHelper } from "igniteui-react-core";
import { ContentControl } from "igniteui-react-core";
import { ILegendContext_$type } from "igniteui-react-core";
import { DataTemplatePassInfo } from "igniteui-react-core";
import { DataTemplateMeasureInfo } from "igniteui-react-core";
import { DataTemplateRenderInfo } from "igniteui-react-core";
import { CanvasViewRenderer } from "igniteui-react-core";
import { Size } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { FontUtil } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
import { IChartLegend_$type } from "igniteui-react-core";
import { ObservableCollection$1 } from "igniteui-react-core";
import { UIElement } from "igniteui-react-core";
import { ILegendSeries_$type } from "igniteui-react-core";
import { PropertyUpdatedEventArgs } from "igniteui-react-core";
import { LegendMouseButtonEventArgs } from "./LegendMouseButtonEventArgs";
import { LegendMouseEventArgs } from "./LegendMouseEventArgs";
import { LegendVisualData } from "./LegendVisualData";
import { MouseButtonEventArgs } from "igniteui-react-core";
import { MouseEventArgs } from "igniteui-react-core";
import { RectData } from "igniteui-react-core";
import { AppearanceHelper } from "igniteui-react-core";
import { LegendItemVisualData } from "./LegendItemVisualData";
import { stringIsNullOrEmpty } from "igniteui-react-core";
/**
 * @hidden
 */
var LegendBaseViewManager = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(LegendBaseViewManager, _super);
    function LegendBaseViewManager(a) {
        var _this = _super.call(this) || this;
        _this.a = null;
        _this.l = null;
        _this.g = null;
        _this.d = false;
        _this.f = null;
        _this.m = null;
        _this.c = null;
        _this.a = a;
        _this.f = new Dictionary$2(Base.$, DomWrapper_$type, 0);
        return _this;
    }
    LegendBaseViewManager.prototype.p = function () {
        var a = LegendItemHelper.b;
        if (window.devicePixelRatio != undefined && (isNaN_(a) || window.devicePixelRatio != a)) {
            LegendItemHelper.b = window.devicePixelRatio;
            this.a.al();
        }
    };
    LegendBaseViewManager.prototype.u = function () {
    };
    LegendBaseViewManager.prototype.s = function () {
        this.p();
    };
    LegendBaseViewManager.prototype.t = function (a) {
        if (a == null) {
            this.l = null;
            this.g = null;
            return;
        }
        this.g = a;
        this.l = this.i();
        this.l.addClass(this.a.s);
        this.g.append(this.l);
    };
    LegendBaseViewManager.prototype.i = function () {
        return this.g.createElement("table");
    };
    LegendBaseViewManager.prototype.h = function () {
        var a = this.g.createElement("tr");
        a.addClass(this.a.t);
        var b = this.a.k;
        if (b) {
            a.setStyleProperty("display", "block");
            a.setStyleProperty("float", "left");
            a.setStyleProperty("margin", "0px");
            a.setStyleProperty("margin-right", "8px");
        }
        return a;
    };
    LegendBaseViewManager.prototype.j = function (a) {
        return this.k(a, this.l);
    };
    LegendBaseViewManager.prototype.k = function (a, b) {
        var c = typeCast(ContentControl.$, a);
        var d = this.h();
        if (c != null) {
            var e = typeCast(ILegendContext_$type, c.content);
            if (e != null && c.ah != null) {
                var f = new DataTemplatePassInfo();
                f.context = d;
                f.passID = "LegendItem";
                var g = new DataTemplateMeasureInfo();
                g.passInfo = f;
                g.width = NaN;
                g.height = NaN;
                g.data = e;
                g.context = d;
                var h = new DataTemplateRenderInfo();
                h.passInfo = f;
                if (c.ah.measure != null) {
                    c.ah.measure(g);
                }
                h.context = this.g.getSubRenderer(d);
                h.availableWidth = g.width;
                h.availableHeight = g.height;
                h.data = e;
                h.xPosition = 0;
                h.yPosition = 0;
                c.ah.render(h);
                var i = d.findByClass(".ui-legend-item-badge");
                for (var j = 0; j < i.length; j++) {
                    i[j].removeClass("ui-legend-item-badge").addClass(this.a.r);
                }
                i = d.findByClass(".ui-legend-item-text");
                for (var k = 0; k < i.length; k++) {
                    if (this.a.k) {
                        i[k].setStyleProperty("white-space", "nowrap");
                    }
                    i[k].removeClass("ui-legend-item-text").addClass(this.a.u);
                }
            }
        }
        return d;
    };
    LegendBaseViewManager.prototype.o = function (a, b) {
        var c = this.k(a, this.l);
        c.listen("mouseup", runOn(this.a, this.a.ae));
        c.listen("mousedown", runOn(this.a, this.a.ab));
        c.listen("mouseleave", runOn(this.a, this.a.ac));
        c.listen("mousemove", runOn(this.a, this.a.ad));
        this.f.addItem(a, c);
        if ((this.l.getChildCount() == 0) || (b >= this.l.getChildCount())) {
            this.l.append(c);
        }
        else {
            var d = this.l.getChildAt(b);
            d.before(c);
        }
    };
    LegendBaseViewManager.prototype.w = function (a) {
    };
    LegendBaseViewManager.prototype.x = function (a) {
        var _this = this;
        var b;
        if (((function () { var c = _this.f.tryGetValue(a, b); b = c.p1; return c.ret; })())) {
            b.unlistenAll();
            b.remove();
            this.f.removeItem(a);
        }
    };
    LegendBaseViewManager.prototype.n = function (visual_) {
        var e_1, _a;
        try {
            for (var _b = tslib_1.__values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var pair_ = _c.value;
                if (pair_.value.getNativeElement() === visual_) {
                    return pair_.key;
                }
                ;
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        return null;
    };
    LegendBaseViewManager.prototype.e = function (a) {
        var e_2, _a;
        try {
            for (var _b = tslib_1.__values(fromEnum(this.f.keys)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                var c = typeCast(ContentControl.$, b);
                if (c != null && c.content != null) {
                    var d = typeCast(ILegendContext_$type, c.content);
                    if (d != null && d.itemLabel == a.itemLabel && d.legendLabel == a.legendLabel && d.series == a.series && d.itemBrush == a.itemBrush) {
                        return true;
                    }
                }
            }
        }
        catch (e_2_1) {
            e_2 = { error: e_2_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_2)
                    throw e_2.error;
            }
        }
        return false;
    };
    LegendBaseViewManager.prototype.b = function (a) {
        var b = this.g.rootWrapper.width();
        var c = this.g.rootWrapper.height();
        this.l.remove();
        var d = this.g.createElement("div");
        d.setStyleProperty("position", "relative");
        this.m = this.g.createElement("<canvas style=\"position : absolute; top : 0; left : 0\" />");
        this.m.setStyleProperty("position", "absolute");
        this.m.setStyleProperty("top", "0px");
        this.m.setStyleProperty("left", "0px");
        this.g.append(d);
        d.append(this.m);
        this.c = new RenderingContext(new CanvasViewRenderer(), this.g.get2DCanvasContext(this.m));
        this.m.setAttribute("width", b.toString());
        this.m.setAttribute("height", c.toString());
        return this.c;
    };
    LegendBaseViewManager.prototype.ab = function () {
        return new Size(1, this.g.rootWrapper.width(), Math.max(10, this.g.rootWrapper.height() - 15));
    };
    LegendBaseViewManager.prototype.y = function (a, b, c, d) {
        var e_3, _a;
        var e = a.g();
        e.beginPath();
        e.moveTo(b.ak._inner[0].x, b.ak._inner[0].y);
        for (var f = 1; f < b.ak.count; f++) {
            e.lineTo(b.ak._inner[f].x, b.ak._inner[f].y);
        }
        e.lineTo(b.ak._inner[0].x, b.ak._inner[0].y);
        var g = e.createLinearGradient(d.left, d.top, d.left, d.top + d.height);
        try {
            for (var _b = tslib_1.__values(fromEnum(c.a)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var h = _c.value;
                g.addColorStop(h.a, h.b._fill);
            }
        }
        catch (e_3_1) {
            e_3 = { error: e_3_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_3)
                    throw e_3.error;
            }
        }
        e.fillStyle = g;
        e.fill();
    };
    LegendBaseViewManager.prototype.q = function () {
    };
    LegendBaseViewManager.prototype.r = function () {
    };
    LegendBaseViewManager.prototype.v = function (a) {
        var b = this.l == null ? 0 : this.l.getChildCount();
        for (var c = 0; c < b; c++) {
            var d = this.l.getChildAt(c);
            d.setStyleProperty("display", a ? "block" : "");
            d.setStyleProperty("float", a ? "left" : "");
            d.setStyleProperty("margin", a ? "0px" : "");
            d.setStyleProperty("margin-right", a ? "8px" : "");
            d.getChildAt(1).setStyleProperty("white-space", a ? "nowrap" : "");
        }
    };
    LegendBaseViewManager.prototype.z = function (a) {
        this.l.setStyleProperty("color", a);
    };
    LegendBaseViewManager.prototype.aa = function (a) {
        var b = FontUtil.getFontInfoFromString(this.g, a);
        this.l.setStyleProperty("font-family", b.n);
        this.l.setStyleProperty("font-size", b.d + "px");
        this.l.setStyleProperty("font-style", b.q);
    };
    LegendBaseViewManager.$t = markType(LegendBaseViewManager, 'LegendBaseViewManager');
    return LegendBaseViewManager;
}(Base));
export { LegendBaseViewManager };
/**
 * @hidden
 */
var LegendBase = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(LegendBase, _super);
    function LegendBase() {
        var _this = _super.call(this) || this;
        _this.ak = null;
        _this.at = null;
        _this._seriesOwner = null;
        _this._chartOwner = null;
        _this.propertyChanged = null;
        _this.propertyUpdated = null;
        _this.legendItemMouseLeftButtonDown = null;
        _this.legendItemMouseLeftButtonUp = null;
        _this.legendItemMouseEnter = null;
        _this.legendItemMouseLeave = null;
        _this.legendItemMouseMove = null;
        var a = _this.aj();
        _this.a8(a);
        a.ak();
        _this.at = new ObservableCollection$1(UIElement.$, 0);
        _this.aw = "ig-chart-legend-items-list";
        _this.ax = "ig-chart-legend-item";
        _this.av = "ig-chart-legend-item-badge";
        _this.ay = "ig-chart-legend-item-text";
        return _this;
    }
    LegendBase.prototype.onDetachedFromUI = function () {
        this.ak.aj();
    };
    LegendBase.prototype.onAttachedToUI = function () {
        this.ak.ah();
    };
    LegendBase.prototype.aj = function () {
        return new LegendBaseView(this);
    };
    LegendBase.prototype.a8 = function (a) {
        this.ak = a;
    };
    LegendBase.prototype.addChildInOrder = function (a, b) {
    };
    LegendBase.prototype.a0 = function (a, b) {
    };
    Object.defineProperty(LegendBase.prototype, "seriesOwner", {
        get: function () {
            return this._seriesOwner;
        },
        set: function (a) {
            this._seriesOwner = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LegendBase.prototype, "chartOwner", {
        get: function () {
            return this._chartOwner;
        },
        set: function (a) {
            this._chartOwner = a;
        },
        enumerable: true,
        configurable: true
    });
    LegendBase.prototype.get_isItemwise = function () {
        return false;
    };
    Object.defineProperty(LegendBase.prototype, "isItemwise", {
        get: function () {
            return this.get_isItemwise();
        },
        enumerable: true,
        configurable: true
    });
    LegendBase.prototype.get_isScale = function () {
        return false;
    };
    Object.defineProperty(LegendBase.prototype, "isScale", {
        get: function () {
            return this.get_isScale();
        },
        enumerable: true,
        configurable: true
    });
    LegendBase.prototype.clearLegendItemsForSeries = function (a) {
        var e_4, _a, e_5, _b;
        if (a == null || this.at == null || this.at.count == 0) {
            return;
        }
        var b = new ObservableCollection$1(UIElement.$, 0);
        try {
            for (var _c = tslib_1.__values(fromEnum(this.at)), _d = _c.next(); !_d.done; _d = _c.next()) {
                var c = _d.value;
                var d = typeCast(ContentControl.$, c);
                if (d != null && d.content != null) {
                    var e = typeCast(ILegendContext_$type, d.content);
                    if (e != null && e.series == a) {
                        b.add(c);
                    }
                }
            }
        }
        catch (e_4_1) {
            e_4 = { error: e_4_1 };
        }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return))
                    _a.call(_c);
            }
            finally {
                if (e_4)
                    throw e_4.error;
            }
        }
        try {
            for (var _e = tslib_1.__values(fromEnum(b)), _f = _e.next(); !_f.done; _f = _e.next()) {
                var f = _f.value;
                this.at.remove(f);
            }
        }
        catch (e_5_1) {
            e_5 = { error: e_5_1 };
        }
        finally {
            try {
                if (_f && !_f.done && (_b = _e.return))
                    _b.call(_e);
            }
            finally {
                if (e_5)
                    throw e_5.error;
            }
        }
    };
    LegendBase.prototype.containsChild = function (a) {
        return this.at.contains(a);
    };
    LegendBase.prototype.removeChild = function (a) {
        this.at.remove(a);
    };
    Object.defineProperty(LegendBase.prototype, "ai", {
        get: function () {
            if (this.seriesOwner != null) {
                return this.seriesOwner;
            }
            else {
                return this.chartOwner;
            }
        },
        enumerable: true,
        configurable: true
    });
    LegendBase.prototype.a9 = function (a, b, c) {
        if (this.propertyChanged != null) {
            this.propertyChanged(this, new PropertyChangedEventArgs(a));
        }
        if (this.propertyUpdated != null) {
            this.propertyUpdated(this, new PropertyUpdatedEventArgs(a, b, c));
        }
    };
    LegendBase.prototype.a5 = function (a) {
        if (this.legendItemMouseLeftButtonDown != null) {
            this.legendItemMouseLeftButtonDown(this, a);
        }
        if (a.d != null) {
            a.d.onLegendItemPointerDown(a.item);
        }
    };
    LegendBase.prototype.a6 = function (a) {
        if (this.legendItemMouseLeftButtonUp != null) {
            this.legendItemMouseLeftButtonUp(this, a);
        }
        if (a.d != null) {
            a.d.onLegendItemPointerUp(a.item);
        }
    };
    LegendBase.prototype.a3 = function (a) {
        if (this.legendItemMouseEnter != null) {
            this.legendItemMouseEnter(this, a);
        }
        if (a.d != null) {
            a.d.onLegendItemEnter(a.item);
        }
    };
    LegendBase.prototype.a4 = function (a) {
        if (this.legendItemMouseLeave != null) {
            this.legendItemMouseLeave(this, a);
        }
        if (a.d != null) {
            a.d.onLegendItemLeave(a.item);
        }
    };
    LegendBase.prototype.a7 = function (a) {
        if (this.legendItemMouseMove != null) {
            this.legendItemMouseMove(this, a);
        }
        if (a.d != null) {
            a.d.onLegendItemOver(a.item);
        }
    };
    LegendBase.prototype.provideContainer = function (a) {
        this.ak.ai(a);
    };
    Object.defineProperty(LegendBase.prototype, "aw", {
        get: function () {
            return this.ak.s;
        },
        set: function (a) {
            this.ak.s = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LegendBase.prototype, "ax", {
        get: function () {
            return this.ak.t;
        },
        set: function (a) {
            this.ak.t = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LegendBase.prototype, "av", {
        get: function () {
            return this.ak.r;
        },
        set: function (a) {
            this.ak.r = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LegendBase.prototype, "ay", {
        get: function () {
            return this.ak.u;
        },
        set: function (a) {
            this.ak.u = a;
        },
        enumerable: true,
        configurable: true
    });
    LegendBase.prototype.exportVisualData = function () {
        return this.ak.f();
    };
    LegendBase.prototype.exportSerializedVisualData = function () {
        return this.exportVisualData().serialize();
    };
    LegendBase.prototype.get_isFinancial = function () {
        return false;
    };
    Object.defineProperty(LegendBase.prototype, "isFinancial", {
        get: function () {
            return this.get_isFinancial();
        },
        enumerable: true,
        configurable: true
    });
    LegendBase.$t = markType(LegendBase, 'LegendBase', ContentControl.$, [INotifyPropertyChanged_$type, IChartLegend_$type]);
    return LegendBase;
}(ContentControl));
export { LegendBase };
/**
 * @hidden
 */
var LegendBaseView = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(LegendBaseView, _super);
    function LegendBaseView(a) {
        var _this = _super.call(this) || this;
        _this.c = null;
        _this.b = null;
        _this.s = null;
        _this.t = null;
        _this.r = null;
        _this.u = null;
        _this.l = false;
        _this.i = false;
        _this.p = null;
        _this.q = null;
        _this.b = a;
        _this.c = new LegendBaseViewManager(_this);
        _this.c.p();
        return _this;
    }
    LegendBaseView.prototype.aj = function () {
        this.c.u();
    };
    LegendBaseView.prototype.ah = function () {
        this.c.s();
    };
    LegendBaseView.prototype.ak = function () {
    };
    LegendBaseView.prototype.get_j = function () {
        return false;
    };
    Object.defineProperty(LegendBaseView.prototype, "j", {
        get: function () {
            return this.get_j();
        },
        enumerable: true,
        configurable: true
    });
    LegendBaseView.prototype.d = function (a) {
        var b;
        var c;
        var d;
        var e = this.aa(a, b, c, d);
        b = e.p1;
        c = e.p2;
        d = e.p3;
        var f = new MouseButtonEventArgs();
        var g = new LegendMouseButtonEventArgs(b, c, d, f, a);
        return g;
    };
    LegendBaseView.prototype.e = function (a) {
        var b;
        var c;
        var d;
        var e = this.aa(a, b, c, d);
        b = e.p1;
        c = e.p2;
        d = e.p3;
        var f = new MouseEventArgs();
        var g = new LegendMouseEventArgs(b, c, d, f, a);
        return g;
    };
    LegendBaseView.prototype.aa = function (a, b, c, d) {
        b = this.b.ai;
        c = null;
        d = null;
        if (a != null) {
            var e = typeCast(ContentControl.$, a);
            if (e != null && e.content != null && typeCast(ILegendContext_$type, e.content) !== null) {
                var f = typeCast(ILegendContext_$type, e.content);
                c = typeCast(ILegendSeries_$type, f.series);
                if (c != null) {
                    b = c.container;
                }
                d = f.item;
            }
        }
        return {
            p1: b,
            p2: c,
            p3: d
        };
    };
    LegendBaseView.prototype.z = function () {
    };
    LegendBaseView.prototype.m = function () {
        return true;
    };
    LegendBaseView.prototype.y = function (a) {
    };
    LegendBaseView.prototype.am = function (a) {
    };
    LegendBaseView.prototype.ai = function (a) {
        this.c.t(a);
    };
    LegendBaseView.prototype.an = function (a) {
        this.c.x(a);
    };
    LegendBaseView.prototype.x = function (a) {
        var b = this.b.at.indexOf(a);
        this.c.o(a, b);
    };
    LegendBaseView.prototype.af = function () {
        this.c.q();
    };
    LegendBaseView.prototype.ag = function () {
        this.c.r();
    };
    Object.defineProperty(LegendBaseView.prototype, "k", {
        get: function () {
            return this.i;
        },
        set: function (a) {
            this.i = a;
            this.c.v(this.i);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LegendBaseView.prototype, "v", {
        get: function () {
            return this.p;
        },
        set: function (a) {
            this.p = a;
            this.c.z(this.p);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LegendBaseView.prototype, "w", {
        get: function () {
            return this.q;
        },
        set: function (a) {
            this.q = a;
            this.c.aa(this.q);
        },
        enumerable: true,
        configurable: true
    });
    LegendBaseView.prototype.al = function () {
        this.c.p();
    };
    LegendBaseView.prototype.n = function (e_) {
        var ev_ = e_.originalEvent;
        return ev_.currentTarget;
    };
    LegendBaseView.prototype.o = function (e_) {
        return this.c.n(this.n(e_));
    };
    LegendBaseView.prototype.ad = function (a) {
        if (!this.l) {
            this.b.a3(this.e(this.o(a)));
        }
        this.l = true;
    };
    LegendBaseView.prototype.ac = function (a) {
        if (this.l) {
            this.b.a4(this.e(this.o(a)));
        }
        this.l = false;
    };
    LegendBaseView.prototype.ab = function (a) {
        this.b.a5(this.d(this.o(a)));
    };
    LegendBaseView.prototype.ae = function (a) {
        this.b.a6(this.d(this.o(a)));
    };
    LegendBaseView.prototype.h = function (a) {
        var b = a.querySelectorAll("span *");
        var c = Rect.empty;
        for (var e = 0; e < b.length; e++) {
            var d = b[e];
            if (stringIsNullOrEmpty(d.getText())) {
                continue;
            }
            var f = new Rect(0, d.getOffset().left, d.getOffset().top, d.width(), d.height());
            f.union(c);
            c = f;
        }
        return RectData.b(c);
    };
    LegendBaseView.prototype.g = function (a) {
        var b = a.querySelectorAll("canvas");
        var c = b.length > 0 ? b[0] : null;
        return c != null ? new RectData(c.getOffset().left, c.getOffset().top, c.width(), c.height()) : null;
    };
    LegendBaseView.prototype.a = function (a) {
        if (this.b == null || this.b.at == null || this.b.at.count <= a) {
            return null;
        }
        var b = this.b.at._inner[a];
        if (b == null) {
            return null;
        }
        var c = b.content;
        if (c == null) {
            return null;
        }
        var d = c.actualItemBrush != null ? c.actualItemBrush : c.itemBrush;
        return AppearanceHelper.b(d);
    };
    LegendBaseView.prototype.f = function () {
        var a = new LegendVisualData();
        var b = this.c.l;
        var c = b.getChildCount();
        for (var d = 0; d < c; d++) {
            var e = new LegendItemVisualData();
            var f = b.getChildAt(d);
            e.label = f.getText();
            e.label = e.label != null ? e.label.trim() : null;
            e.bounds = new RectData(f.getOffset().left, f.getOffset().top, f.width(), f.height());
            e.labelBounds = this.h(f);
            e.badgeBounds = this.g(f);
            a.items.add(e);
        }
        for (var g = 0; g < this.b.at.count; g++) {
            a.items._inner[g].appearance.fill = this.a(g);
        }
        return a;
    };
    LegendBaseView.$t = markType(LegendBaseView, 'LegendBaseView');
    return LegendBaseView;
}(Base));
export { LegendBaseView };
//# sourceMappingURL=LegendBaseViewManager_combined.js.map
