/*
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 { RadialBaseChart } from "./RadialBaseChart";
import { ProportionalCategoryAngleAxis } from "./ProportionalCategoryAngleAxis";
import { NumericRadiusAxis } from "./NumericRadiusAxis";
import { typeCast, runOn, delegateCombine, enumGetBox, markType } from "igniteui-react-core";
import { PieChartSweepDirection_$type } from "./PieChartSweepDirection";
import { CalloutCollisionMode_$type } from "igniteui-react-core";
import { LegendEmptyValuesMode_$type } from "igniteui-react-core";
import { OthersCategoryType_$type } from "igniteui-react-core";
import { AxisRangeBufferMode_$type } from "./AxisRangeBufferMode";
import { RadialLabelMode_$type } from "igniteui-react-core";
import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { RadialBase } from "./RadialBase";
import { RadialPieSeries } from "./RadialPieSeries";
import { AnchoredRadialSeries } from "./AnchoredRadialSeries";
import { AxisLabelSettings } from "./AxisLabelSettings";
import { isNaN_ } from "igniteui-react-core";
/**
 * @hidden
 */
export let DataPieBaseChart = /*@__PURE__*/ (() => {
    class DataPieBaseChart extends RadialBaseChart {
        constructor() {
            super();
            this.ait = null;
            this.agz = null;
            this.aip = null;
            this.agx = null;
            this.air = null;
            this.agy = null;
            this.aio = null;
            this.agw = null;
            this.ah0 = 0;
            this.ahg = 0;
            this.ag6 = 6;
            this.akf = null;
            this.ake = null;
            this.aiu = null;
            this.ain = null;
            this.aha = 0;
            this.ahe = 1;
            this.ah1 = 3;
            this.aiq = null;
            this.aim = null;
            this.ahr = true;
            this.ag4 = 0;
            this.ahy = 0;
            this.ahz = 0;
            this.ah4 = 0;
            this.ahs = false;
            this.aik = 10;
            this.ah6 = NaN;
            this.ah5 = NaN;
            this.ah7 = 0;
            this.ah2 = NaN;
            this.ah3 = NaN;
            this.ais = " - ";
            this.ahl = 0;
            this.ahk = 0;
            this.ahp = true;
            this.ahq = true;
            this.ag8 = 0;
        }
        hb() {
            return true;
        }
        aka(a) {
            this.akb((b, c) => a(b));
        }
        akb(a) {
            if (this.dataChart == null) {
                return;
            }
            for (let b = 0; b < this.dataChart.series.count; b++) {
                let c = this.dataChart.series._inner[b];
                if (c.ft) {
                    a(c, b);
                }
            }
        }
        aj8(a) {
            this.aj9((b, c) => a(b));
        }
        aj9(a) {
            if (this.dataChart == null) {
                return;
            }
            for (let b = 0; b < this.dataChart.series.count; b++) {
                let c = this.dataChart.series._inner[b];
                if (c.ft) {
                    a(c, b);
                }
            }
        }
        wm() {
            let a = this.bf.dataSeries != null ? this.bf.dataSeries.count : 0;
            super.wm();
            if (this.ai0 != null) {
                let b = this.ai0;
                this.angleAxis.f2 = b;
            }
            else {
                this.angleAxis.f2 = this.ach == null ? RadialBaseChart.ady(this.angleAxis, this.bf.dataSeries) : this.ach;
            }
            this.angleAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
            if (this.aj5 != null) {
                this.angleAxis.ok = this.aj5;
            }
            else {
                this.angleAxis.ok = (this.dataChart != null && this.dataChart.series.count > 0 && typeCast(RadialPieSeries.$, this.dataChart.series._inner[0]) !== null) ? this.dataChart.series._inner[0].acv : null;
            }
        }
        c2(a, b) {
            if (this.c5 == null || this.c5.count == 0) {
                return 13;
            }
            let c = super.c2(a, b);
            if (c == 1) {
                return 13;
            }
            return c;
        }
        wk(a) {
        }
        g7(a) {
            if (!super.g7(a)) {
                return false;
            }
            return true;
        }
        wn() {
            this.valueAxis.lo = this.ahx;
            this.valueAxis.mm = this.ail;
        }
        get angleAxis() {
            return this.ahi;
        }
        set angleAxis(a) {
            let b = this.angleAxis;
            if (a != b) {
                this.ahi = a;
                this.vr("AngleAxis", b, this.angleAxis);
            }
        }
        get valueAxis() {
            return this.ahc;
        }
        set valueAxis(a) {
            let b = this.valueAxis;
            if (a != b) {
                this.ahc = a;
                this.vr("ValueAxis", b, this.valueAxis);
            }
        }
        get_ahu() {
            return false;
        }
        get ahu() {
            return this.get_ahu();
        }
        dc(a, b) {
            let c = null;
            if (b == 34) {
                c = this.aho(a, b);
            }
            if (a.index > 0) {
                if (!this.ahu) {
                    if (c != null) {
                        c.o2();
                    }
                    return null;
                }
            }
            return c;
        }
        u3(a, b) {
            super.u3(a, b);
            if (this.gv(a) && this.ce.isCalloutLayer(a)) {
                if (this.akh != null) {
                    this.ce.setCalloutLightColor(a, this.akh);
                }
                if (this.akg != null) {
                    this.ce.setCalloutDarkColor(a, this.akg);
                }
                let c = this.ah;
                if (this.ag7 != 0) {
                    c = this.ag7;
                }
                this.ce.setCollisionMode(a, c);
            }
        }
        aho(a, b) {
            let c = null;
            if (b == 34) {
                c = this.de(34);
            }
            else {
                c = this.de(34);
            }
            if (this.aj5 != null) {
                c.acv = this.aj5;
            }
            else {
                c.acv = a.getMemberPathFor(0);
            }
            if (this.ai3 != null) {
                c.ady = this.ai3;
            }
            c.ado = this.ahb;
            c.yx = this.angleAxis;
            c.y3 = this.valueAxis;
            c.g9 = true;
            c.acf = true;
            c.aa0 = this.ajp;
            c.yp = this.ag3;
            c.aax = this.aji;
            c.yo = this.ag2;
            c.aaq = this.ai9;
            c.ym = this.ag1;
            c.aau = this.ai5;
            c.yn = this.ag0;
            c.zc = this.ahn;
            c.zd = this.ahm;
            c.aab = this.ajn;
            return c;
        }
        z1() {
            return this.angleAxis;
        }
        z2() {
            return this.valueAxis;
        }
        ud() {
            this.angleAxis = new ProportionalCategoryAngleAxis();
            this.angleAxis.name = "angleAxis";
            let a = this.angleAxis;
            a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.akc));
            this.angleAxis.k5 = 0;
            this.valueAxis = new NumericRadiusAxis();
            this.valueAxis.name = "valueAxis";
            let b = this.valueAxis;
            b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.akd));
            if (this.angleAxis.az == null) {
                this.angleAxis.az = new AxisLabelSettings();
            }
            if (this.valueAxis.az == null) {
                this.valueAxis.az = new AxisLabelSettings();
            }
        }
        akc(a, b) {
            switch (b.propertyName) {
                case "ActualMinimumValue":
                    this.v8("AngleAxisActualMinimum");
                    break;
                case "ActualMaximumValue":
                    this.v8("AngleAxisActualMaximum");
                    break;
            }
        }
        akd(a, b) {
            switch (b.propertyName) {
                case "ActualMinimumValue":
                    this.v8("ValueAxisActualMinimum");
                    break;
                case "ActualMaximumValue":
                    this.v8("ValueAxisActualMaximum");
                    break;
            }
        }
        t7(a, b) {
            let c = typeCast(RadialBase.$, a);
            if (c != null) {
                c.w8 = this.c2(a, b);
            }
        }
        ae8(a) {
            super.ae8(a);
            a.lf = this.ahv;
            a.lj = this.ahw;
            a.og = this.aia;
            if (!isNaN_(this.aic)) {
                a.oh = this.aic;
            }
            else {
                a.oh = 0.65;
            }
        }
        ae6(a) {
            super.ae6(a);
            a.oe = this.aje;
            a.ny = this.ahf;
            a.ob = this.aib;
            if (!isNaN_(this.aid)) {
                a.ne = this.aid;
            }
            if (this.ahh != 0) {
                if (this.ahh == 1) {
                    a.ch = false;
                }
                else {
                    a.ch = true;
                }
            }
        }
        vr(a, b, c) {
            super.vr(a, b, c);
            switch (a) {
                case "SliceLabelPositionMode":
                    this.up((d) => {
                        if (d.eo) {
                            this.ce.setCollisionMode(d, this.ag7);
                        }
                    });
                    break;
                case "SliceLabelContentSeparator":
                    this.aj8((d) => d.aab = this.ajn);
                    break;
                case "SliceLabelContentMode":
                    this.aj8((d) => d.zc = this.ahn);
                    break;
                case "LegendSliceLabelContentMode":
                    this.aj8((d) => d.zd = this.ahm);
                    break;
                case "SliceLabelFormat":
                    this.aj8((d) => d.aa0 = this.ajp);
                    break;
                case "SliceLabelFormatSpecifiers":
                    this.aj8((d) => d.yp = this.ag3);
                    break;
                case "OthersSliceLabelFormat":
                    this.aj8((d) => d.aax = this.aji);
                    break;
                case "OthersSliceLabelFormatSpecifiers":
                    this.aj8((d) => d.yo = this.ag2);
                    break;
                case "LegendSliceLabelFormat":
                    this.aj8((d) => d.aaq = this.ajp);
                    break;
                case "LegendSliceLabelFormatSpecifiers":
                    this.aj8((d) => d.ym = this.ag3);
                    break;
                case "LegendOthersSliceLabelFormat":
                    this.aj8((d) => d.aau = this.ai5);
                    break;
                case "LegendOthersSliceLabelFormatSpecifiers":
                    this.aj8((d) => d.yn = this.ag0);
                    break;
                case "SweepDirection":
                    if (this.angleAxis != null) {
                        if (this.ahh != 0) {
                            if (this.ahh == 1) {
                                this.angleAxis.ch = false;
                            }
                            else {
                                this.angleAxis.ch = true;
                            }
                        }
                        else {
                            this.angleAxis.ch = this.aad;
                        }
                    }
                    break;
                case "StartAngle":
                    if (this.angleAxis != null) {
                        this.angleAxis.ne = isNaN_(this.aid) ? 0 : this.aid;
                    }
                    break;
                case "RadiusExtent":
                    if (this.valueAxis != null) {
                        this.valueAxis.oh = isNaN_(this.aic) ? 0.65 : this.aic;
                    }
                    break;
                case "OthersCategoryText":
                    if (this.angleAxis != null) {
                        this.angleAxis.oe = this.aje;
                    }
                    break;
                case "OthersCategoryType":
                    if (this.angleAxis != null) {
                        this.angleAxis.ny = this.ahf;
                    }
                    break;
                case "OthersCategoryThreshold":
                    if (this.angleAxis != null) {
                        this.angleAxis.ob = this.aib;
                    }
                    break;
                case "InnerExtent":
                    if (this.valueAxis != null) {
                        this.valueAxis.og = this.aia;
                    }
                    break;
                case "LightSliceLabelColor":
                    this.um((d) => {
                        if (d.eo) {
                            this.ce.setCalloutLightColor(d, this.akh);
                        }
                    });
                    break;
                case "DarkSliceLabelColor":
                    this.um((d) => {
                        if (d.eo) {
                            this.ce.setCalloutDarkColor(d, this.akg);
                        }
                    });
                    break;
                case "ValueMemberPath":
                    if (c != null) {
                        this.ur((d) => {
                            if (typeCast(AnchoredRadialSeries.$, d) !== null) {
                                let e = d;
                                e.acv = this.aj5;
                            }
                        });
                        this.angleAxis.ok = this.aj5;
                    }
                    else {
                        this.vx();
                    }
                    break;
                case "LabelMemberPath":
                    if (c != null) {
                        let d = this.ai0;
                        this.angleAxis.f2 = d;
                    }
                    else {
                        this.vx();
                    }
                    break;
                case "LegendLabelMemberPath":
                    if (c != null) {
                        this.ur((e) => {
                            if (typeCast(RadialPieSeries.$, e) !== null) {
                                let f = e;
                                f.ady = this.ai3;
                            }
                        });
                    }
                    else {
                        this.vx();
                    }
                    break;
                case "AngleAxisInterval":
                    this.angleAxis.nb = this.ah8;
                    break;
                case "ValueAxisInterval":
                    this.valueAxis.l8 = this.aig;
                    break;
                case "ValueAxisFavorLabellingScaleEnd":
                    this.valueAxis.lj = this.ahw;
                    break;
                case "ValueAxisAutoRangeBufferMode":
                    this.valueAxis.ky = this.ag5;
                    break;
                case "AngleAxisMinorInterval":
                    this.angleAxis.nc = this.ah9;
                    break;
                case "ValueAxisMinorInterval":
                    this.valueAxis.md = this.aij;
                    break;
                case "ValueAxisIsLogarithmic":
                    this.valueAxis.lo = this.ahx;
                    break;
                case "ValueAxisLogarithmBase":
                    this.valueAxis.mm = this.ail;
                    break;
                case "ValueAxisMinimumValue":
                    this.valueAxis.mc = this.aii;
                    break;
                case "ValueAxisMaximumValue":
                    this.valueAxis.mb = this.aih;
                    break;
                case "MarkerCollision":
                    this.us((e, f) => this.t7(e, f));
                    break;
                case "ValueAxisAbbreviateLargeNumbers":
                    this.aff((e) => e.lf = this.ahv);
                    break;
            }
        }
        get ajp() {
            return this.ait;
        }
        set ajp(a) {
            let b = this.ajp;
            if (a != b) {
                this.ait = a;
                this.vr("SliceLabelFormat", b, this.ajp);
            }
        }
        get ag3() {
            return this.agz;
        }
        set ag3(a) {
            let b = this.ag3;
            if (a != b) {
                this.agz = a;
                this.vr("SliceLabelFormatSpecifiers", b, this.ag3);
            }
        }
        get ai9() {
            return this.aip;
        }
        set ai9(a) {
            let b = this.ai9;
            if (a != b) {
                this.aip = a;
                this.vr("LegendSliceLabelFormat", b, this.ai9);
            }
        }
        get ag1() {
            return this.agx;
        }
        set ag1(a) {
            let b = this.ag1;
            if (a != b) {
                this.agx = a;
                this.vr("LegendSliceLabelFormatSpecifiers", b, this.ag1);
            }
        }
        get aji() {
            return this.air;
        }
        set aji(a) {
            let b = this.aji;
            if (a != b) {
                this.air = a;
                this.vr("OthersSliceLabelFormat", b, this.aji);
            }
        }
        get ag2() {
            return this.agy;
        }
        set ag2(a) {
            let b = this.ag2;
            if (a != b) {
                this.agy = a;
                this.vr("OthersSliceLabelFormatSpecifiers", b, this.ag2);
            }
        }
        get ai5() {
            return this.aio;
        }
        set ai5(a) {
            let b = this.ai5;
            if (a != b) {
                this.aio = a;
                this.vr("LegendOthersSliceLabelFormat", b, this.ai5);
            }
        }
        get ag0() {
            return this.agw;
        }
        set ag0(a) {
            let b = this.ag0;
            if (a != b) {
                this.agw = a;
                this.vr("LegendOthersSliceLabelFormatSpecifiers", b, this.ag0);
            }
        }
        get aia() {
            return this.ah0;
        }
        set aia(a) {
            let b = this.aia;
            if (a != b) {
                this.ah0 = a;
                this.vr("InnerExtent", b, this.aia);
            }
        }
        get ahh() {
            return this.ahg;
        }
        set ahh(a) {
            let b = this.ahh;
            if (a != b) {
                this.ahg = a;
                this.vr("SweepDirection", enumGetBox(PieChartSweepDirection_$type, b), enumGetBox(PieChartSweepDirection_$type, this.ahh));
            }
        }
        get ag7() {
            return this.ag6;
        }
        set ag7(a) {
            let b = this.ag7;
            if (a != b) {
                this.ag6 = a;
                this.vr("SliceLabelPositionMode", enumGetBox(CalloutCollisionMode_$type, b), enumGetBox(CalloutCollisionMode_$type, this.ag7));
            }
        }
        get akh() {
            return this.akf;
        }
        set akh(a) {
            let b = this.akh;
            if (a != b) {
                this.akf = a;
                this.vr("LightSliceLabelColor", b, this.akh);
            }
        }
        get akg() {
            return this.ake;
        }
        set akg(a) {
            let b = this.akg;
            if (a != b) {
                this.ake = a;
                this.vr("DarkSliceLabelColor", b, this.akg);
            }
        }
        get aj5() {
            return this.aiu;
        }
        set aj5(a) {
            let b = this.aj5;
            if (a != b) {
                this.aiu = a;
                this.vr("ValueMemberPath", b, this.aj5);
            }
        }
        get ai3() {
            return this.ain;
        }
        set ai3(a) {
            let b = this.ain;
            if (a != b) {
                this.ain = a;
                this.vr("LegendLabelMemberPath", b, this.ain);
            }
        }
        get ahb() {
            return this.aha;
        }
        set ahb(a) {
            let b = this.aha;
            if (a != b) {
                this.aha = a;
                this.vr("LegendEmptyValuesMode", enumGetBox(LegendEmptyValuesMode_$type, b), this.ain);
            }
        }
        get ahf() {
            return this.ahe;
        }
        set ahf(a) {
            let b = this.ahf;
            if (a != b) {
                this.ahe = a;
                this.vr("OthersCategoryType", enumGetBox(OthersCategoryType_$type, b), enumGetBox(OthersCategoryType_$type, this.ahf));
            }
        }
        get aib() {
            return this.ah1;
        }
        set aib(a) {
            let b = this.aib;
            if (a != b) {
                this.ah1 = a;
                this.vr("OthersCategoryThreshold", b, this.aib);
            }
        }
        get aje() {
            return this.aiq;
        }
        set aje(a) {
            let b = this.aje;
            if (a != b) {
                this.aiq = a;
                this.vr("OthersCategoryText", b, this.aje);
            }
        }
        get ai0() {
            return this.aim;
        }
        set ai0(a) {
            let b = this.ai0;
            if (a != b) {
                this.aim = a;
                this.vr("LabelMemberPath", b, this.ai0);
            }
        }
        get ahw() {
            return this.ahr;
        }
        set ahw(a) {
            let b = this.ahw;
            if (a != b) {
                this.ahr = a;
                this.vr("ValueAxisFavorLabellingScaleEnd", b, this.ahw);
            }
        }
        get ag5() {
            return this.ag4;
        }
        set ag5(a) {
            let b = this.ag5;
            if (a != b) {
                this.ag4 = a;
                this.vr("ValueAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ag5));
            }
        }
        get ah8() {
            return this.ahy;
        }
        set ah8(a) {
            let b = this.ah8;
            if (a != b) {
                this.ahy = a;
                this.vr("AngleAxisInterval", b, this.ah8);
            }
        }
        get ah9() {
            return this.ahz;
        }
        set ah9(a) {
            let b = this.ah9;
            if (a != b) {
                this.ahz = a;
                this.vr("AngleAxisMinorInterval", b, this.ah9);
            }
        }
        get aig() {
            return this.ah4;
        }
        set aig(a) {
            let b = this.aig;
            if (a != b) {
                this.ah4 = a;
                this.vr("ValueAxisInterval", b, this.aig);
            }
        }
        get ahx() {
            return this.ahs;
        }
        set ahx(a) {
            let b = this.ahx;
            if (a != b) {
                this.ahs = a;
                this.vr("ValueAxisIsLogarithmic", b, this.ahx);
            }
        }
        get ail() {
            return this.aik;
        }
        set ail(a) {
            let b = this.ail;
            if (a != b) {
                this.aik = a;
                this.vr("ValueAxisLogarithmBase", b, this.ail);
            }
        }
        get aii() {
            return this.ah6;
        }
        set aii(a) {
            let b = this.aii;
            if (a != b) {
                this.ah6 = a;
                this.vr("ValueAxisMinimumValue", b, this.aii);
            }
        }
        get aih() {
            return this.ah5;
        }
        set aih(a) {
            let b = this.aih;
            if (a != b) {
                this.ah5 = a;
                this.vr("ValueAxisMaximumValue", b, this.aih);
            }
        }
        get aij() {
            return this.ah7;
        }
        set aij(a) {
            let b = this.aij;
            if (a != b) {
                this.ah7 = a;
                this.vr("ValueAxisMinorInterval", b, this.aij);
            }
        }
        get aif() {
            return this.valueAxis.l4;
        }
        get aie() {
            return this.valueAxis.l3;
        }
        get aic() {
            return this.ah2;
        }
        set aic(a) {
            let b = this.aic;
            if (a != b) {
                this.ah2 = a;
                this.vr("RadiusExtent", b, this.aic);
            }
        }
        get aid() {
            return this.ah3;
        }
        set aid(a) {
            let b = this.aid;
            if (a != b) {
                this.ah3 = a;
                this.vr("StartAngle", b, this.aid);
            }
        }
        get ajn() {
            return this.ais;
        }
        set ajn(a) {
            let b = this.ajn;
            if (a != b) {
                this.ais = a;
                this.vr("SliceLabelContentSeparator", b, this.ajn);
            }
        }
        get ahn() {
            return this.ahl;
        }
        set ahn(a) {
            let b = this.ahn;
            if (a != b) {
                this.ahl = a;
                this.vr("SliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.ahn));
            }
        }
        get ahm() {
            return this.ahk;
        }
        set ahm(a) {
            let b = this.ahm;
            if (a != b) {
                this.ahk = a;
                this.vr("LegendSliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.ahm));
            }
        }
        get aht() {
            return this.ahp;
        }
        set aht(a) {
            let b = this.aht;
            if (a != b) {
                this.ahp = a;
                this.vr("AngleAxisFavorLabellingScaleEnd", b, this.aht);
            }
        }
        get ahv() {
            return this.ahq;
        }
        set ahv(a) {
            let b = this.ahv;
            if (a != b) {
                this.ahq = a;
                this.vr("ValueAxisAbbreviateLargeNumbers", b, this.ahv);
            }
        }
        get ag9() {
            return this.ag8;
        }
        set ag9(a) {
            let b = this.ag8;
            if (a != b) {
                this.ag8 = a;
                this.vr("MarkerCollision", enumGetBox(CollisionAvoidanceType_$type, b), enumGetBox(CollisionAvoidanceType_$type, this.ag8));
            }
        }
    }
    DataPieBaseChart.$t = /*@__PURE__*/ markType(DataPieBaseChart, 'DataPieBaseChart', RadialBaseChart.$);
    return DataPieBaseChart;
})();
