/*
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 { ScatterBase } from "./ScatterBase";
import { IScaleLegendSeries_$type } from "igniteui-angular-core";
import { ISupportsSizeScale_$type } from "./ISupportsSizeScale";
import { ISupportsFillScale_$type } from "./ISupportsFillScale";
import { List$1 } from "igniteui-angular-core";
import { UIElement } from "igniteui-angular-core";
import { Base, typeCast, Point_$type, fromEnum, markType, markDep, enumGetBox, runOn } from "igniteui-angular-core";
import { ActualRange } from "./ActualRange";
import { DependencyProperty } from "igniteui-angular-core";
import { SizeScale } from "./SizeScale";
import { BrushScale } from "./BrushScale";
import { ScatterFrame } from "./ScatterFrame";
import { IChartLegend_$type } from "igniteui-angular-core";
import { ValueBrushScale } from "./ValueBrushScale";
import { IFastItemsSource_$type } from "igniteui-angular-core";
import { ScatterBaseView } from "./ScatterBaseView";
import { ScalerParams } from "./ScalerParams";
import { OwnedPoint } from "./OwnedPoint";
import { Dictionary$2 } from "igniteui-angular-core";
import { BubbleMarkerManager } from "./BubbleMarkerManager";
import { IChartItemLegend_$type } from "igniteui-angular-core";
import { IChartScaleLegend_$type } from "igniteui-angular-core";
import { ContentControl } from "igniteui-angular-core";
import { DataContext } from "igniteui-angular-core";
import { DeviceUtils } from "igniteui-angular-core";
import { BrushUtil } from "igniteui-angular-core";
import { DataLegendSeriesValueInfo } from "igniteui-angular-core";
import { DataLegendSeriesContext } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { isNaN_, isInfinity, logBase } from "igniteui-angular-core";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
import { BrushSelectionMode_$type } from "./BrushSelectionMode";
import { ScatterTrendLineManager } from "./ScatterTrendLineManager";
import { Defaults } from "./Defaults";
/**
 * @hidden
 */
export let BubbleSeries = /*@__PURE__*/ (() => {
    class BubbleSeries extends ScatterBase {
        constructor() {
            super();
            this.w9 = null;
            this.w8 = null;
            this.vw = null;
            this.vo = null;
            this.vn = null;
            this.vm = null;
            this.vk = null;
            this.ab = BubbleSeries.$;
            this.sb = new ScatterFrame();
            this.sd = new ScatterFrame();
            this.r9 = new ScatterFrame();
        }
        get_c5() {
            return true;
        }
        by() {
            return new BubbleSeriesView(this);
        }
        l4(a) {
            super.l4(a);
            this.vj = a;
        }
        g0() {
            return 0.7;
        }
        qf() {
            if (this.qe == 0) {
                return 2;
            }
            return super.qf();
        }
        isAttachedTo(a) {
            return this.a2 == a;
        }
        c4() {
            return true;
        }
        le(a) {
            super.le(a);
            if (this.vr != null && this.vw != null && this.vw.count > 0) {
                for (let b = 0; b < this.vw.count; b++) {
                    a(this.vw._inner[b]);
                }
            }
        }
        get vq() {
            return this.vs;
        }
        w7(a) {
            let b = typeCast(CustomPaletteBrushScale.$, this.vi);
            let c = typeCast(ValueBrushScale.$, this.vi);
            let d = this.vi;
            if (b != null && this.cl != null) {
                return b.getBrush1(a, this.cl.count);
            }
            else if (c != null) {
                return c.getBrushByIndex(a, this.vp);
            }
            else if (d != null) {
                return d.getBrush(a);
            }
            return null;
        }
        get legendReady() {
            return this.vs != null && this.vs.count != 0;
        }
        get minScaleText() {
            let a = this.vh(this.vl).b;
            return (Math.round(a * 1000) / 1000).toString();
        }
        get maxScaleText() {
            let a = this.vh(this.vl).a;
            return (Math.round(a * 1000) / 1000).toString();
        }
        forScaleColors(a) {
            for (let b = 0; b < this.vs.count; b++) {
                if (this.vi == null || !this.vi.isReady) {
                    return false;
                }
                let c = NaN;
                if (this.vp != null) {
                    c = (this.vp.item(b) - this.vp.minimum) / (this.vp.maximum - this.vp.minimum);
                }
                let d = (this.vs.item(b) - this.vs.minimum) / (this.vs.maximum - this.vs.minimum);
                if (isNaN_(c)) {
                    c = 0;
                }
                if (isNaN_(d)) {
                    d = c;
                }
                let e = this.rl;
                let f = this.w7(b);
                let g = f != null ? f : e;
                a(g, d);
            }
            return true;
        }
        h1(a, b) {
            let c = this.jv(b);
            if (c == BubbleSeries.$$p[5]) {
                return this.h2(a, b, this.wb);
            }
            if (c == BubbleSeries.$$p[11]) {
                return this.h2(a, b, this.wl);
            }
            if (c == ScatterBase.$$p[10]) {
                return this.h2(a, b, this.tr);
            }
            if (c == ScatterBase.$$p[14]) {
                return this.h2(a, b, this.tz);
            }
            if (c == BubbleSeries.$$p[2]) {
                return this.h2(a, b, this.v6);
            }
            return super.h1(a, b);
        }
        get vs() {
            return this.vo;
        }
        set vs(a) {
            if (this.vo != a) {
                let b = this.vs;
                this.vo = a;
                this.raisePropertyChanged("RadiusColumn", b, this.vs);
            }
        }
        get vr() {
            return this.vn;
        }
        set vr(a) {
            if (this.vn != a) {
                let b = this.vr;
                this.vn = a;
                this.raisePropertyChanged("LabelColumn", b, this.vr);
            }
        }
        get vp() {
            return this.vm;
        }
        set vp(a) {
            if (this.vm != a) {
                let b = this.vp;
                this.vm = a;
                this.raisePropertyChanged("FillColumn", b, this.vp);
            }
        }
        t2(a, b, c, d, e) {
            if (c <= this.tb) {
                b.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, c);
            }
            let f = this.tb;
            let g = this.cl;
            let h;
            let i;
            let j = this.getEffectiveViewport1(a);
            let k = new ScalerParams(0, d, e, this.r5.d, j);
            let l = new ScalerParams(0, d, e, this.r5.e, j);
            let m = false;
            let n = 0;
            if (this.ce != null) {
                if (this.ce.e8()) {
                    let o = this.ce.li(d, k);
                    m = o.c;
                    n = o.d;
                }
            }
            for (let p = 0; p < c; p++) {
                h = this.sl.item(p);
                i = this.sm.item(p);
                let q = { $type: Point_$type, x: this.r5.a.ei(h, k), y: this.r5.b.ei(i, l) };
                if (m) {
                    if (q.x < e.left || q.x > e.right) {
                        if (q.x + n >= e.left && q.x + n <= e.right) {
                            q = { $type: Point_$type, x: q.x + n, y: i };
                        }
                    }
                }
                if (!isInfinity(q.x) && !isInfinity(q.y)) {
                    let r = g.item(p);
                    if (c <= f) {
                        if (!b.g.containsKey(r)) {
                            let s = { $type: Point_$type, x: h, y: i };
                            b.g.addItem(r, ((() => {
                                let $ret = new OwnedPoint();
                                $ret.a = r;
                                $ret.b = s;
                                $ret.c = q;
                                return $ret;
                            })()));
                        }
                    }
                }
            }
        }
        ua(a, b) {
            let c = typeCast(BubbleSeriesView.$, b);
            let d = c.cv;
            d.m = this.vs;
            super.ua(a, b);
            let e = Math.min(this.sl != null ? this.sl.count : 0, this.sm != null ? this.sm.count : 0);
            if (e < 1) {
                return;
            }
            c.dh();
            c.di();
        }
        wq() {
            if (this.ce == null) {
                return;
            }
            if (this.a2 == null) {
                return;
            }
            if (this.a2.isItemwise) {
                let a = this.a2;
                this.a2.clearLegendItemsForSeries(this);
                this.wp();
                a.renderItemwiseContent(this);
            }
            if (this.a2.isScale) {
                let b = this.a2;
                b.restoreOriginalState();
                b.initializeLegend(this);
            }
        }
        static vx(a, b, c, d, e) {
            if (e <= a || isNaN_(e) || isInfinity(e)) {
                return c;
            }
            if (e >= b) {
                return d;
            }
            let f = c + ((d - c) / (b - a)) * (e - a);
            return f;
        }
        static vy(a, b, c, d, logBase_, e) {
            let f = logBase(e, logBase_);
            let g = logBase(a, logBase_);
            let h = logBase(b, logBase_);
            return BubbleSeries.vx(g, h, c, d, f);
        }
        fd(a, b, c) {
            let d = super.fd(a, b, c);
            if (this.vs == null || this.cl == null || this.vs.count == 0 || this.cl.count != this.vs.count) {
                d = false;
            }
            return d;
        }
        sv(a, b) {
            if (b != 3) {
                return true;
            }
            if (a == null) {
                return true;
            }
            if (this.tr == a || this.tz == a || this.wl == a) {
                return true;
            }
            return false;
        }
        wp() {
            let a = typeCast(IChartLegend_$type, this.a2);
            if (a == null || this.cl == null) {
                return;
            }
            this.vw = new List$1(UIElement.$, 0);
            let b = typeCast(CustomPaletteBrushScale.$, this.vi);
            let c = typeCast(ValueBrushScale.$, this.vi);
            let d = this.vi;
            let e = this.vg();
            let f = e.b;
            let g = e.a;
            let h = this.cl;
            for (let i = 0; i < h.count; i++) {
                let j = null;
                if (c != null && this.vp != null) {
                    let k = this.vp.item(i);
                    j = c.getBrushByRange(k, f, g);
                }
                else if (b != null) {
                    j = b.getBrush1(i, h.count);
                }
                else if (d != null) {
                    j = d.getBrush(i);
                }
                let l = new ContentControl();
                let m = this.vr != null && this.vr.item(i) != null ? this.vr.item(i).toString() : "";
                l.content = ((() => {
                    let $ret = new DataContext();
                    $ret.series = this;
                    $ret.item = h.item(i);
                    $ret.itemBrush = j;
                    $ret.itemLabel = m;
                    return $ret;
                })());
                let n = this.nh;
                if (n == null) {
                    n = this.b1.bl(this.b6);
                }
                l.ah = n;
                this.vw.add(l);
            }
        }
        k5(a, b, c, d) {
            super.k5(a, b, c, d);
            if (this.vl != null) {
                this.vl.aa();
            }
            if (this.vi != null) {
                this.vi.x();
            }
            this.wq();
        }
        ln() {
            super.ln();
            this.wq();
        }
        lt() {
            super.lt();
            this.wq();
        }
        l9(a, b, c, d) {
            super.l9(a, b, c, d);
            switch (b) {
                case "FastItemsSource":
                    if (this.vl != null) {
                        this.vl.aa();
                    }
                    if (this.vi != null) {
                        this.vi.x();
                    }
                    if (typeCast(IFastItemsSource_$type, c) != null) {
                        c.deregisterColumn(this.vs);
                        c.deregisterColumn(this.vp);
                        c.deregisterColumn(this.vr);
                        this.vs = null;
                        this.vp = null;
                        this.vr = null;
                    }
                    if (typeCast(IFastItemsSource_$type, d) != null) {
                        this.vs = this.ci(this.wl);
                        if (!stringIsNullOrEmpty(this.v6)) {
                            this.vp = this.ci(this.v6);
                        }
                        this.vr = this.ck(this.wb);
                    }
                    this.mn(false);
                    this.wq();
                    break;
                case BubbleSeries.$$p[11]:
                    if (this.vl != null) {
                        this.vl.aa();
                    }
                    if (this.cl != null) {
                        this.cl.deregisterColumn(this.vs);
                        this.vs = this.ci(this.wl);
                        this.wq();
                    }
                    break;
                case "RadiusColumn":
                    if (this.vl != null) {
                        this.vl.aa();
                    }
                    this.r6.cx.g$i();
                    this.mn(false);
                    this.lv();
                    break;
                case BubbleSeries.$$p[12]:
                    if (c != null) {
                        c.l.remove(this);
                        c.aa();
                    }
                    if (d != null) {
                        d.l.add(this);
                        d.aa();
                    }
                    this.mn(false);
                    this.lu();
                    break;
                case BubbleSeries.$$p[13]:
                    this.mn(false);
                    this.lu();
                    break;
                case "DiscreteLegendItemTemplate":
                    this.wq();
                    break;
                case BubbleSeries.$$p[3]:
                    if (c != null) {
                        c.o.remove(this);
                        c.x();
                    }
                    if (d != null) {
                        d.o.add(this);
                        d.x();
                    }
                    this.mn(false);
                    this.wq();
                    this.lu();
                    break;
                case BubbleSeries.$$p[4]:
                case BubbleSeries.$$p[8]:
                case BubbleSeries.$$p[7]:
                case BubbleSeries.$$p[6]:
                    this.mn(false);
                    this.wq();
                    this.lu();
                    break;
                case "FillColumn":
                    this.mn(false);
                    this.lu();
                    break;
                case BubbleSeries.$$p[2]:
                    if (this.vi != null) {
                        this.vi.x();
                    }
                    if (this.cl != null) {
                        this.cl.deregisterColumn(this.vp);
                        this.vp = this.ci(this.v6);
                        this.wq();
                    }
                    break;
                case BubbleSeries.$$p[5]:
                    if (this.cl != null) {
                        this.cl.deregisterColumn(this.vr);
                        this.vr = this.ck(this.wb);
                        this.wq();
                    }
                    break;
                case "ActualLegend":
                    let e = typeCast(IChartLegend_$type, c);
                    if (e != null && e.isItemwise) {
                        let f = typeCast(IChartItemLegend_$type, e);
                        f.clearLegendItemsForSeries(this);
                    }
                    if (e != null && e.isScale) {
                        let g = typeCast(IChartScaleLegend_$type, e);
                        let h = true;
                        let i = null;
                        if (this.ce != null) {
                            for (let j of fromEnum(this.ce.series)) {
                                if (j.legend == g) {
                                    i = j;
                                    h = false;
                                }
                            }
                        }
                        if (h) {
                            g.restoreOriginalState();
                        }
                        else {
                            g.initializeLegend(typeCast(IScaleLegendSeries_$type, i));
                        }
                    }
                    this.wq();
                    break;
                case "SeriesViewer":
                    this.wq();
                    break;
            }
        }
        updateSizeScaleGlobals() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.vs != null) {
                a.b = this.vs.minimum;
                a.a = this.vs.maximum;
            }
            if (this.vl != null) {
                this.vl.ab(a.b, a.a);
            }
        }
        updateFillScaleGlobals() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.vp != null) {
                a.b = this.vp.minimum;
                a.a = this.vp.maximum;
            }
            if (this.vi != null) {
                this.vi.z(a.b, a.a);
            }
        }
        vh(a) {
            let b = new ActualRange();
            b.b = NaN;
            b.a = NaN;
            if (this.vs != null) {
                b.b = this.vs.minimum;
                b.a = this.vs.maximum;
            }
            if (a != null) {
                a.x();
                if (this.vv) {
                    b.b = a.globalMinimum;
                    b.a = a.globalMaximum;
                }
            }
            return b;
        }
        vg() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.vp != null) {
                a.b = this.vp.minimum;
                a.a = this.vp.maximum;
            }
            let b = typeCast(ValueBrushScale.$, this.vi);
            if (b != null) {
                b.s();
                if (this.vt && this.vi.o.count > 1) {
                    a.b = b.q;
                    a.a = b.p;
                }
            }
            return a;
        }
        ws(a, b, c, d) {
            let e = c.width;
            if (!this.b1.bu.isEmpty) {
                e = this.b1.bu.width;
            }
            else if (this.ce != null && !this.ce.tp.isEmpty) {
                e = this.ce.tp.width;
            }
            let f = DeviceUtils.c(e);
            this.vk = this.vl || ((() => {
                let $ret = new SizeScale();
                $ret.minimumValue = f / 10;
                $ret.maximumValue = f / 5;
                return $ret;
            })());
            if (this.vk != null) {
                let g = this.vk.minimumValue;
                let h = this.vk.maximumValue;
                let i = this.vk.logarithmBase;
                let j = this.vh(this.vk);
                let k = j.b;
                let l = j.a;
                if (this.vk.isLogarithmic) {
                    for (let m = 0; m < b.count; m++) {
                        b._inner[m] = BubbleSeries.vy(k, l, g, h, i, b._inner[m]);
                    }
                }
                else {
                    for (let n = 0; n < b.count; n++) {
                        b._inner[n] = BubbleSeries.vx(k, l, g, h, b._inner[n]);
                    }
                }
            }
            let o = 1;
            o = DeviceUtils.d();
            let p = this.vl == null;
            if (d) {
                let q = c.width / e;
                for (let r = 0; r < b.count; r++) {
                    if (p) {
                        b._inner[r] = b._inner[r] / o;
                    }
                    b._inner[r] = b._inner[r] * q;
                }
            }
            for (let s = 0; s < a.count; s++) {
                let t = a._inner[s];
                if (p && !d) {
                    t.width = Math.max(0, b._inner[s] / o);
                    t.height = Math.max(0, b._inner[s] / o);
                }
                else {
                    t.width = Math.max(0, b._inner[s]);
                    t.height = Math.max(0, b._inner[s]);
                }
            }
        }
        wr(a) {
            let b = typeCast(BubbleSeriesView.$, this.b0);
            this.vj.b3 = false;
            if (b != null) {
                b.b3 = false;
            }
            let c = typeCast(CustomPaletteBrushScale.$, this.vi);
            let d = typeCast(ValueBrushScale.$, this.vi);
            let e = this.vi;
            let f = this.vg();
            let g = f.b;
            let h = f.a;
            let i = this.vi == null || !this.vi.isReady || (d != null && this.v6 == null);
            if (i) {
                this.vj.dg();
                if (b != null) {
                    b.dg();
                }
                return;
            }
            this.vj.b3 = true;
            if (b != null) {
                b.b3 = true;
            }
            let j = a.count;
            let k = this.cl;
            for (let l = 0; l < j; l++) {
                let m = a._inner[l];
                let n = typeCast(DataContext.$, m.content);
                if (n != null) {
                    let o = null;
                    let p = k.indexOf(n.item);
                    if (c != null) {
                        o = c.getBrush1(p, k.count);
                    }
                    else if (d != null && this.vp != null) {
                        let q = this.vp.item(p);
                        o = d.getBrushByRange(q, g, h);
                    }
                    else if (e != null) {
                        o = e.getBrush(p);
                    }
                    else {
                        if (this.rn == null) {
                            o = this.rl;
                        }
                        else {
                            o = this.rn;
                        }
                    }
                    let r = null;
                    if (this.ro == null) {
                        r = this.rm;
                    }
                    else {
                        r = this.ro;
                    }
                    if (this.vu && o != null) {
                        r = o;
                    }
                    if (r != null && !isNaN_(this.v0)) {
                        r = BrushUtil.l(r, this.v0);
                    }
                    if (o != null && !isNaN_(this.vz)) {
                        o = BrushUtil.l(o, this.vz);
                    }
                    n.itemBrush = o;
                    n.actualItemBrush = o;
                    n.outline = r;
                }
            }
        }
        getDataLegendSeriesContextAt(a, b) {
            let c = { $type: Point_$type, x: a, y: b };
            let d = this.hy(c);
            let e = d == null ? NaN : this.gf(d, "XMemberPath");
            let f = d == null ? NaN : this.gf(d, "YMemberPath");
            let g = new DataLegendSeriesValueInfo();
            g.a = 13;
            g.l = e;
            g.p = "X";
            g.q = this.tr != null ? this.tr : "X";
            g.r = this.tn != null ? this.tn : "X:";
            g.s = this.tp != null ? this.tp : "";
            let h = new DataLegendSeriesValueInfo();
            h.l = f;
            h.a = 14;
            h.p = "Y";
            h.q = this.tz != null ? this.tz : "Y";
            h.r = this.tv != null ? this.tv : "Y:";
            h.s = this.tx != null ? this.tx : "";
            let i = new DataLegendSeriesContext();
            i.f = ((() => {
                let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
                $ret.add(g);
                $ret.add(h);
                return $ret;
            })());
            i.b = this.aw();
            if (!stringIsNullOrEmpty(this.wl)) {
                let j = d == null ? NaN : this.gf(d, "RadiusMemberPath");
                let k = new DataLegendSeriesValueInfo();
                k.l = j;
                k.a = 11;
                k.p = "Radius";
                k.q = this.wl != null ? this.wl : "Radius";
                k.r = this.wh != null ? this.wh : "R:";
                k.s = this.wj != null ? this.wj : "";
                i.f.add(k);
            }
            else if (this.vk != null) {
                let l = new DataLegendSeriesValueInfo();
                l.l = this.vk.maximumValue;
                l.a = 11;
                l.p = "Radius";
                l.q = this.wl != null ? this.wl : "Radius";
                l.r = this.wh != null ? this.wh : "R:";
                l.s = this.wj != null ? this.wj : "";
                i.f.add(l);
            }
            if (!stringIsNullOrEmpty(this.v6)) {
                let m = d == null ? NaN : this.gf(d, "FillMemberPath");
                let n = new DataLegendSeriesValueInfo();
                n.l = m;
                n.a = 12;
                n.p = "Fill";
                n.q = this.v6 != null ? this.v6 : "Fill";
                n.r = this.v2 != null ? this.v2 : "F:";
                n.s = this.v4 != null ? this.v4 : "";
                i.f.add(n);
            }
            return i;
        }
        get actualMarkerBrush() {
            return this.rl;
        }
    }
    BubbleSeries.$t = markType(BubbleSeries, 'BubbleSeries', ScatterBase.$, [IScaleLegendSeries_$type, ISupportsSizeScale_$type, ISupportsFillScale_$type]);
    BubbleSeries.$$p = markDep(DependencyProperty, PropertyMetadata, BubbleSeries, 'raisePropertyChanged', ['FillMemberAsLegendLabel:v2:wt', [2, null], 'FillMemberAsLegendUnit:v4:wu', [2, null], 'FillMemberPath:v6:wv', [2], 'FillScale:vi:ww', [BrushScale.$], 'FillScaleUseGlobalValues:vt:wx', [0, false], 'LabelMemberPath:wb:wy', [2], 'MarkerBrushBrightness:vz:wz', [1, NaN], 'MarkerOutlineBrightness:v0:w0', [1, NaN], 'MarkerOutlineUsesFillScale:vu:w1', [0, false], 'RadiusMemberAsLegendLabel:wh:w2', [2, null], 'RadiusMemberAsLegendUnit:wj:w3', [2, null], 'RadiusMemberPath:wl:w4', [2, null], 'RadiusScale:vl:w5', [SizeScale.$], 'RadiusScaleUseGlobalValues:vv:w6', [0, false]]);
    return BubbleSeries;
})();
/**
 * @hidden
 */
export let CustomPaletteBrushScale = /*@__PURE__*/ (() => {
    class CustomPaletteBrushScale extends BrushScale {
        constructor() {
            super();
        }
        getBrush1(a, b) {
            if (this.brushes == null || this.brushes.count == 0) {
                return null;
            }
            if (this.brushSelectionMode == 0) {
                return super.getBrush(a % this.brushes.count);
            }
            let c = BubbleSeries.vx(0, b - 1, 0, this.brushes.count - 1, a);
            return this.ab(c);
        }
        get_isReady() {
            return this.brushes != null && this.brushes.count > 0;
        }
    }
    CustomPaletteBrushScale.$t = markType(CustomPaletteBrushScale, 'CustomPaletteBrushScale', BrushScale.$);
    CustomPaletteBrushScale.$$p = markDep(DependencyProperty, PropertyMetadata, CustomPaletteBrushScale, 'v', ['BrushSelectionMode', [BrushSelectionMode_$type, enumGetBox(BrushSelectionMode_$type, 0)]]);
    return CustomPaletteBrushScale;
})();
/**
 * @hidden
 */
export let BubbleSeriesView = /*@__PURE__*/ (() => {
    class BubbleSeriesView extends ScatterBaseView {
        constructor(a) {
            super(a);
            this.df = null;
            this.df = a;
            this.cx = new ScatterTrendLineManager();
        }
        as() {
            super.as();
            if (!this.q) {
                this.b1.ql = Defaults.e;
            }
        }
        cu() {
            return new BubbleMarkerManager((a) => this.cy.item(a), (a) => this.cw.r5.c.item(a), runOn(this, this.c9), runOn(this, this.cr), runOn(this, this.cz));
        }
        dh() {
            let a = this.cv;
            this.df.ws(a.n, a.o, this.bu, this == this.e.b0);
            this.aq();
        }
        di() {
            let a = this.cv;
            this.df.wr(a.n);
        }
        dg() {
            let a = this.cv;
            for (let b of fromEnum(a.n)) {
                let c = typeCast(DataContext.$, b.content);
                if (c != null) {
                    c.itemBrush = null;
                    c.outline = null;
                }
            }
        }
        getDefaultTooltipTemplate() {
            let a = "<div class='ui-chart-default-tooltip-content'><span";
            let b = this.e.a7.a$r(this.e);
            if (!stringIsNullOrEmpty(b)) {
                a += " style='color:" + b + "'";
            }
            a += ">" + this.df.title + "</span><br/><span>" + "(${item." + this.df.tr + "}, ${item." + this.df.tz + "})</span>";
            if (!stringIsNullOrEmpty(this.df.wl)) {
                a += "<span>, Radius: ${item." + this.df.wl + "}</span>";
            }
            a += "</div>";
            return a;
        }
    }
    BubbleSeriesView.$t = markType(BubbleSeriesView, 'BubbleSeriesView', ScatterBaseView.$);
    return BubbleSeriesView;
})();
