/*
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 { 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.ahz = null;
            this.af8 = null;
            this.ahv = null;
            this.af6 = null;
            this.ahx = null;
            this.af7 = null;
            this.ahu = null;
            this.af5 = null;
            this.ag7 = 0;
            this.agn = 0;
            this.agf = 6;
            this.aji = null;
            this.ajh = null;
            this.ah0 = null;
            this.agl = 1;
            this.ag8 = 3;
            this.ahw = null;
            this.aht = null;
            this.agy = true;
            this.agd = 0;
            this.ag5 = 0;
            this.ag6 = 0;
            this.ahb = 0;
            this.agz = false;
            this.ahr = 10;
            this.ahd = NaN;
            this.ahc = NaN;
            this.ahe = 0;
            this.ag9 = NaN;
            this.aha = NaN;
            this.ahy = " - ";
            this.ags = 0;
            this.agr = 0;
            this.agw = true;
            this.agx = true;
            this.agh = 0;
        }
        ajd(a) {
            this.aje((b, c) => a(b));
        }
        aje(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.fr) {
                    a(c, b);
                }
            }
        }
        ajb(a) {
            this.ajc((b, c) => a(b));
        }
        ajc(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.fr) {
                    a(c, b);
                }
            }
        }
        v4() {
            let a = this.bj.dataSeries != null ? this.bj.dataSeries.count : 0;
            super.v4();
            if (this.ah6 != null) {
                let b = this.ah6;
                this.angleAxis.f1 = b;
            }
            else {
                this.angleAxis.f1 = this.abq == null ? RadialBaseChart.ac7(this.angleAxis, this.bj.dataSeries) : this.abq;
            }
            this.angleAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
            if (this.ai8 != null) {
                this.angleAxis.og = this.ai8;
            }
            else {
                this.angleAxis.og = (this.dataChart != null && this.dataChart.series.count > 0 && typeCast(RadialPieSeries.$, this.dataChart.series._inner[0]) !== null) ? this.dataChart.series._inner[0].acl : null;
            }
        }
        c0(a, b) {
            if (this.c3 == null || this.c3.count == 0) {
                return 13;
            }
            let c = super.c0(a, b);
            if (c == 1) {
                return 13;
            }
            return c;
        }
        v2(a) {
        }
        g6(a) {
            if (!super.g6(a)) {
                return false;
            }
            return true;
        }
        v5() {
            this.valueAxis.lj = this.ag4;
            this.valueAxis.ma = this.ahs;
        }
        get angleAxis() {
            return this.agp;
        }
        set angleAxis(a) {
            let b = this.angleAxis;
            if (a != b) {
                this.agp = a;
                this.vf("AngleAxis", b, this.angleAxis);
            }
        }
        get valueAxis() {
            return this.agj;
        }
        set valueAxis(a) {
            let b = this.valueAxis;
            if (a != b) {
                this.agj = a;
                this.vf("ValueAxis", b, this.valueAxis);
            }
        }
        get_ag1() {
            return false;
        }
        get ag1() {
            return this.get_ag1();
        }
        da(a, b) {
            let c = null;
            if (b == 34) {
                c = this.agv(a, b);
            }
            if (a.index > 0) {
                if (!this.ag1) {
                    if (c != null) {
                        c.oz();
                    }
                    return null;
                }
            }
            return c;
        }
        us(a, b) {
            super.us(a, b);
            if (this.gu(a) && this.cc.isCalloutLayer(a)) {
                if (this.ajk != null) {
                    this.cc.setCalloutLightColor(a, this.ajk);
                }
                if (this.ajj != null) {
                    this.cc.setCalloutDarkColor(a, this.ajj);
                }
                let c = this.ak;
                if (this.agg != 0) {
                    c = this.agg;
                }
                this.cc.setCollisionMode(a, c);
            }
        }
        agv(a, b) {
            let c = null;
            if (b == 34) {
                c = this.dc(34);
            }
            else {
                c = this.dc(34);
            }
            if (this.ai8 != null) {
                c.acl = this.ai8;
            }
            else {
                c.acl = a.getMemberPathFor(0);
            }
            c.yq = this.angleAxis;
            c.yv = this.valueAxis;
            c.g7 = true;
            c.ab5 = true;
            c.aar = this.ais;
            c.yi = this.agc;
            c.aao = this.ail;
            c.yh = this.agb;
            c.aah = this.aic;
            c.yf = this.aga;
            c.aal = this.ah8;
            c.yg = this.af9;
            c.y4 = this.agu;
            c.y5 = this.agt;
            c.z3 = this.aiq;
            return c;
        }
        za() {
            return this.angleAxis;
        }
        zb() {
            return this.valueAxis;
        }
        t3() {
            this.angleAxis = new ProportionalCategoryAngleAxis();
            this.angleAxis.name = "angleAxis";
            let a = this.angleAxis;
            a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.ajf));
            this.angleAxis.k2 = 0;
            this.valueAxis = new NumericRadiusAxis();
            this.valueAxis.name = "valueAxis";
            let b = this.valueAxis;
            b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.ajg));
            if (this.angleAxis.az == null) {
                this.angleAxis.az = new AxisLabelSettings();
            }
            if (this.valueAxis.az == null) {
                this.valueAxis.az = new AxisLabelSettings();
            }
        }
        ajf(a, b) {
            switch (b.propertyName) {
                case "ActualMinimumValue":
                    this.vr("AngleAxisActualMinimum");
                    break;
                case "ActualMaximumValue":
                    this.vr("AngleAxisActualMaximum");
                    break;
            }
        }
        ajg(a, b) {
            switch (b.propertyName) {
                case "ActualMinimumValue":
                    this.vr("ValueAxisActualMinimum");
                    break;
                case "ActualMaximumValue":
                    this.vr("ValueAxisActualMaximum");
                    break;
            }
        }
        tx(a, b) {
            let c = typeCast(RadialBase.$, a);
            if (c != null) {
                c.w1 = this.c0(a, b);
            }
        }
        aeh(a) {
            super.aeh(a);
            a.lb = this.ag2;
            a.le = this.ag3;
            a.ny = this.ahh;
            if (!isNaN_(this.ahj)) {
                a.nz = this.ahj;
            }
            else {
                a.nz = 0.65;
            }
        }
        aef(a) {
            super.aef(a);
            a.oa = this.aih;
            a.nu = this.agm;
            a.n7 = this.ahi;
            if (!isNaN_(this.ahk)) {
                a.nb = this.ahk;
            }
            if (this.ago != 0) {
                if (this.ago == 1) {
                    a.ch = false;
                }
                else {
                    a.ch = true;
                }
            }
        }
        vf(a, b, c) {
            super.vf(a, b, c);
            switch (a) {
                case "SliceLabelPositionMode":
                    this.ue((d) => {
                        if (d.em) {
                            this.cc.setCollisionMode(d, this.agg);
                        }
                    });
                    break;
                case "SliceLabelContentSeparator":
                    this.ajb((d) => d.z3 = this.aiq);
                    break;
                case "SliceLabelContentMode":
                    this.ajb((d) => d.y4 = this.agu);
                    break;
                case "LegendSliceLabelContentMode":
                    this.ajb((d) => d.y5 = this.agt);
                    break;
                case "SliceLabelFormat":
                    this.ajb((d) => d.aar = this.ais);
                    break;
                case "SliceLabelFormatSpecifiers":
                    this.ajb((d) => d.yi = this.agc);
                    break;
                case "OthersSliceLabelFormat":
                    this.ajb((d) => d.aao = this.ail);
                    break;
                case "OthersSliceLabelFormatSpecifiers":
                    this.ajb((d) => d.yh = this.agb);
                    break;
                case "LegendSliceLabelFormat":
                    this.ajb((d) => d.aah = this.ais);
                    break;
                case "LegendSliceLabelFormatSpecifiers":
                    this.ajb((d) => d.yf = this.agc);
                    break;
                case "LegendOthersSliceLabelFormat":
                    this.ajb((d) => d.aal = this.ah8);
                    break;
                case "LegendOthersSliceLabelFormatSpecifiers":
                    this.ajb((d) => d.yg = this.af9);
                    break;
                case "SweepDirection":
                    if (this.angleAxis != null) {
                        if (this.ago != 0) {
                            if (this.ago == 1) {
                                this.angleAxis.ch = false;
                            }
                            else {
                                this.angleAxis.ch = true;
                            }
                        }
                        else {
                            this.angleAxis.ch = this.zm;
                        }
                    }
                    break;
                case "StartAngle":
                    if (this.angleAxis != null) {
                        this.angleAxis.nb = isNaN_(this.ahk) ? 0 : this.ahk;
                    }
                    break;
                case "RadiusExtent":
                    if (this.valueAxis != null) {
                        this.valueAxis.nz = isNaN_(this.ahj) ? 0.65 : this.ahj;
                    }
                    break;
                case "OthersCategoryText":
                    if (this.angleAxis != null) {
                        this.angleAxis.oa = this.aih;
                    }
                    break;
                case "OthersCategoryType":
                    if (this.angleAxis != null) {
                        this.angleAxis.nu = this.agm;
                    }
                    break;
                case "OthersCategoryThreshold":
                    if (this.angleAxis != null) {
                        this.angleAxis.n7 = this.ahi;
                    }
                    break;
                case "InnerExtent":
                    if (this.valueAxis != null) {
                        this.valueAxis.ny = this.ahh;
                    }
                    break;
                case "LightSliceLabelColor":
                    this.uc((d) => {
                        if (d.em) {
                            this.cc.setCalloutLightColor(d, this.ajk);
                        }
                    });
                    break;
                case "DarkSliceLabelColor":
                    this.uc((d) => {
                        if (d.em) {
                            this.cc.setCalloutDarkColor(d, this.ajj);
                        }
                    });
                    break;
                case "ValueMemberPath":
                    if (c != null) {
                        this.ug((d) => {
                            if (typeCast(AnchoredRadialSeries.$, d) !== null) {
                                let e = d;
                                e.acl = this.ai8;
                            }
                        });
                        this.angleAxis.og = this.ai8;
                    }
                    else {
                        this.vl();
                    }
                    break;
                case "LabelMemberPath":
                    if (c != null) {
                        let d = this.ah6;
                        this.angleAxis.f1 = d;
                    }
                    else {
                        this.vl();
                    }
                    break;
                case "AngleAxisInterval":
                    this.angleAxis.m8 = this.ahf;
                    break;
                case "ValueAxisInterval":
                    this.valueAxis.l2 = this.ahn;
                    break;
                case "ValueAxisFavorLabellingScaleEnd":
                    this.valueAxis.le = this.ag3;
                    break;
                case "ValueAxisAutoRangeBufferMode":
                    this.valueAxis.kv = this.age;
                    break;
                case "AngleAxisMinorInterval":
                    this.angleAxis.m9 = this.ahg;
                    break;
                case "ValueAxisMinorInterval":
                    this.valueAxis.l7 = this.ahq;
                    break;
                case "ValueAxisIsLogarithmic":
                    this.valueAxis.lj = this.ag4;
                    break;
                case "ValueAxisLogarithmBase":
                    this.valueAxis.ma = this.ahs;
                    break;
                case "ValueAxisMinimumValue":
                    this.valueAxis.l6 = this.ahp;
                    break;
                case "ValueAxisMaximumValue":
                    this.valueAxis.l5 = this.aho;
                    break;
                case "MarkerCollision":
                    this.uh((e, f) => this.tx(e, f));
                    break;
                case "ValueAxisAbbreviateLargeNumbers":
                    this.aeo((e) => e.lb = this.ag2);
                    break;
            }
        }
        get ais() {
            return this.ahz;
        }
        set ais(a) {
            let b = this.ais;
            if (a != b) {
                this.ahz = a;
                this.vf("SliceLabelFormat", b, this.ais);
            }
        }
        get agc() {
            return this.af8;
        }
        set agc(a) {
            let b = this.agc;
            if (a != b) {
                this.af8 = a;
                this.vf("SliceLabelFormatSpecifiers", b, this.agc);
            }
        }
        get aic() {
            return this.ahv;
        }
        set aic(a) {
            let b = this.aic;
            if (a != b) {
                this.ahv = a;
                this.vf("LegendSliceLabelFormat", b, this.aic);
            }
        }
        get aga() {
            return this.af6;
        }
        set aga(a) {
            let b = this.aga;
            if (a != b) {
                this.af6 = a;
                this.vf("LegendSliceLabelFormatSpecifiers", b, this.aga);
            }
        }
        get ail() {
            return this.ahx;
        }
        set ail(a) {
            let b = this.ail;
            if (a != b) {
                this.ahx = a;
                this.vf("OthersSliceLabelFormat", b, this.ail);
            }
        }
        get agb() {
            return this.af7;
        }
        set agb(a) {
            let b = this.agb;
            if (a != b) {
                this.af7 = a;
                this.vf("OthersSliceLabelFormatSpecifiers", b, this.agb);
            }
        }
        get ah8() {
            return this.ahu;
        }
        set ah8(a) {
            let b = this.ah8;
            if (a != b) {
                this.ahu = a;
                this.vf("LegendOthersSliceLabelFormat", b, this.ah8);
            }
        }
        get af9() {
            return this.af5;
        }
        set af9(a) {
            let b = this.af9;
            if (a != b) {
                this.af5 = a;
                this.vf("LegendOthersSliceLabelFormatSpecifiers", b, this.af9);
            }
        }
        get ahh() {
            return this.ag7;
        }
        set ahh(a) {
            let b = this.ahh;
            if (a != b) {
                this.ag7 = a;
                this.vf("InnerExtent", b, this.ahh);
            }
        }
        get ago() {
            return this.agn;
        }
        set ago(a) {
            let b = this.ago;
            if (a != b) {
                this.agn = a;
                this.vf("SweepDirection", enumGetBox(PieChartSweepDirection_$type, b), enumGetBox(PieChartSweepDirection_$type, this.ago));
            }
        }
        get agg() {
            return this.agf;
        }
        set agg(a) {
            let b = this.agg;
            if (a != b) {
                this.agf = a;
                this.vf("SliceLabelPositionMode", enumGetBox(CalloutCollisionMode_$type, b), enumGetBox(CalloutCollisionMode_$type, this.agg));
            }
        }
        get ajk() {
            return this.aji;
        }
        set ajk(a) {
            let b = this.ajk;
            if (a != b) {
                this.aji = a;
                this.vf("LightSliceLabelColor", b, this.ajk);
            }
        }
        get ajj() {
            return this.ajh;
        }
        set ajj(a) {
            let b = this.ajj;
            if (a != b) {
                this.ajh = a;
                this.vf("DarkSliceLabelColor", b, this.ajj);
            }
        }
        get ai8() {
            return this.ah0;
        }
        set ai8(a) {
            let b = this.ai8;
            if (a != b) {
                this.ah0 = a;
                this.vf("ValueMemberPath", b, this.ai8);
            }
        }
        get agm() {
            return this.agl;
        }
        set agm(a) {
            let b = this.agm;
            if (a != b) {
                this.agl = a;
                this.vf("OthersCategoryType", enumGetBox(OthersCategoryType_$type, b), enumGetBox(OthersCategoryType_$type, this.agm));
            }
        }
        get ahi() {
            return this.ag8;
        }
        set ahi(a) {
            let b = this.ahi;
            if (a != b) {
                this.ag8 = a;
                this.vf("OthersCategoryThreshold", b, this.ahi);
            }
        }
        get aih() {
            return this.ahw;
        }
        set aih(a) {
            let b = this.aih;
            if (a != b) {
                this.ahw = a;
                this.vf("OthersCategoryText", b, this.aih);
            }
        }
        get ah6() {
            return this.aht;
        }
        set ah6(a) {
            let b = this.ah6;
            if (a != b) {
                this.aht = a;
                this.vf("LabelMemberPath", b, this.ah6);
            }
        }
        get ag3() {
            return this.agy;
        }
        set ag3(a) {
            let b = this.ag3;
            if (a != b) {
                this.agy = a;
                this.vf("ValueAxisFavorLabellingScaleEnd", b, this.ag3);
            }
        }
        get age() {
            return this.agd;
        }
        set age(a) {
            let b = this.age;
            if (a != b) {
                this.agd = a;
                this.vf("ValueAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.age));
            }
        }
        get ahf() {
            return this.ag5;
        }
        set ahf(a) {
            let b = this.ahf;
            if (a != b) {
                this.ag5 = a;
                this.vf("AngleAxisInterval", b, this.ahf);
            }
        }
        get ahg() {
            return this.ag6;
        }
        set ahg(a) {
            let b = this.ahg;
            if (a != b) {
                this.ag6 = a;
                this.vf("AngleAxisMinorInterval", b, this.ahg);
            }
        }
        get ahn() {
            return this.ahb;
        }
        set ahn(a) {
            let b = this.ahn;
            if (a != b) {
                this.ahb = a;
                this.vf("ValueAxisInterval", b, this.ahn);
            }
        }
        get ag4() {
            return this.agz;
        }
        set ag4(a) {
            let b = this.ag4;
            if (a != b) {
                this.agz = a;
                this.vf("ValueAxisIsLogarithmic", b, this.ag4);
            }
        }
        get ahs() {
            return this.ahr;
        }
        set ahs(a) {
            let b = this.ahs;
            if (a != b) {
                this.ahr = a;
                this.vf("ValueAxisLogarithmBase", b, this.ahs);
            }
        }
        get ahp() {
            return this.ahd;
        }
        set ahp(a) {
            let b = this.ahp;
            if (a != b) {
                this.ahd = a;
                this.vf("ValueAxisMinimumValue", b, this.ahp);
            }
        }
        get aho() {
            return this.ahc;
        }
        set aho(a) {
            let b = this.aho;
            if (a != b) {
                this.ahc = a;
                this.vf("ValueAxisMaximumValue", b, this.aho);
            }
        }
        get ahq() {
            return this.ahe;
        }
        set ahq(a) {
            let b = this.ahq;
            if (a != b) {
                this.ahe = a;
                this.vf("ValueAxisMinorInterval", b, this.ahq);
            }
        }
        get ahm() {
            return this.valueAxis.ly;
        }
        get ahl() {
            return this.valueAxis.lx;
        }
        get ahj() {
            return this.ag9;
        }
        set ahj(a) {
            let b = this.ahj;
            if (a != b) {
                this.ag9 = a;
                this.vf("RadiusExtent", b, this.ahj);
            }
        }
        get ahk() {
            return this.aha;
        }
        set ahk(a) {
            let b = this.ahk;
            if (a != b) {
                this.aha = a;
                this.vf("StartAngle", b, this.ahk);
            }
        }
        get aiq() {
            return this.ahy;
        }
        set aiq(a) {
            let b = this.aiq;
            if (a != b) {
                this.ahy = a;
                this.vf("SliceLabelContentSeparator", b, this.aiq);
            }
        }
        get agu() {
            return this.ags;
        }
        set agu(a) {
            let b = this.agu;
            if (a != b) {
                this.ags = a;
                this.vf("SliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.agu));
            }
        }
        get agt() {
            return this.agr;
        }
        set agt(a) {
            let b = this.agt;
            if (a != b) {
                this.agr = a;
                this.vf("LegendSliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.agt));
            }
        }
        get ag0() {
            return this.agw;
        }
        set ag0(a) {
            let b = this.ag0;
            if (a != b) {
                this.agw = a;
                this.vf("AngleAxisFavorLabellingScaleEnd", b, this.ag0);
            }
        }
        get ag2() {
            return this.agx;
        }
        set ag2(a) {
            let b = this.ag2;
            if (a != b) {
                this.agx = a;
                this.vf("ValueAxisAbbreviateLargeNumbers", b, this.ag2);
            }
        }
        get agi() {
            return this.agh;
        }
        set agi(a) {
            let b = this.agh;
            if (a != b) {
                this.agh = a;
                this.vf("MarkerCollision", enumGetBox(CollisionAvoidanceType_$type, b), enumGetBox(CollisionAvoidanceType_$type, this.agh));
            }
        }
    }
    DataPieBaseChart.$t = /*@__PURE__*/ markType(DataPieBaseChart, 'DataPieBaseChart', RadialBaseChart.$);
    return DataPieBaseChart;
})();
