/*
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 { DataPieBaseChart } from "./DataPieBaseChart";
import { typeCast, EnumUtil, enumGetBox, markType } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { DataSeriesType_$type } from "igniteui-angular-core";
import { IDataSeriesAdapterRule_$type } from "igniteui-angular-core";
import { SimplePieSeriesRule } from "igniteui-angular-core";
import { SubCollectionsRule } from "igniteui-angular-core";
import { DataPieChartType_$type } from "./DataPieChartType";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { TransitionInSpeedType_$type } from "./TransitionInSpeedType";
import { BrushUtil } from "igniteui-angular-core";
import { AxisDefaults } from "./AxisDefaults";
import { Defaults } from "./Defaults";
import { DeviceUtils } from "igniteui-angular-core";
import { RadialBase } from "./RadialBase";
import { RadialPieSeries } from "./RadialPieSeries";
/**
 * @hidden
 */
export let DataPieChart = /*@__PURE__*/ (() => {
    class DataPieChart extends DataPieBaseChart {
        constructor() {
            super();
            this.amm = 1000;
            this.amn = 1000;
            this.amg = null;
            this.amh = null;
            this.amc = 0;
            this.amk = true;
            this.ama = 0;
            this.ame = 3;
            this.vc();
        }
        vw() {
            super.vw();
            if (this.dataChart == null) {
                return;
            }
            let a = this.dataChart.dp.j.e();
            if (this.ahk == null) {
                this.ahk = a.k;
            }
            if (this.ahr == null) {
                this.ahr = a.k;
            }
            this.adf = 0;
            this.ahs = BrushUtil.j(0, 0, 0, 0);
            this.ahv = BrushUtil.j(0, 0, 0, 0);
            this.aho = BrushUtil.j(0, 0, 0, 0);
            this.ahl = BrushUtil.j(0, 0, 0, 0);
            this.acs = 0;
            this.ahp = BrushUtil.j(0, 0, 0, 0);
            this.act = AxisDefaults.axis_TickStroke;
            this.ah6 = 1;
            this.ah7 = 1;
            this.crosshairsDisplayMode = 1;
            this.gv = true;
            this.jw = Defaults.crosshairLineThickness;
            this.y9 = Defaults.crosshairLineBrush;
            this.y4 = Defaults.crosshairXAxisAnnotationBackground;
            this.y5 = Defaults.crosshairXAxisAnnotationTextColor;
            this.autoCalloutsVisible = true;
            this.ht = true;
            this.hb = false;
            this.hj = false;
            this.b0 = 1;
            this.bw = 11;
            this.aml = true;
            this.yy = BrushUtil.j(255, 255, 255, 255);
            this.jv = DeviceUtils.g(2);
            this.gr = true;
            this.gp = true;
            this.gm = true;
            this.dm = 4;
            this.dk = 4;
        }
        vy(a, b) {
            super.vy(a, b);
            a.ki = this.amo;
            a.kj = this.amp;
            a.df = this.ami;
            a.dg = this.amj;
        }
        wr(a, b, c) {
            super.wr(a, b, c);
            switch (a) {
                case "TransitionInDuration":
                    this.vl((d) => d.ki = this.amo);
                    break;
                case "TransitionOutDuration":
                    this.vl((d) => d.kj = this.amp);
                    break;
                case "TransitionInEasingFunction":
                    this.vl((d) => d.df = this.ami);
                    break;
                case "TransitionOutEasingFunction":
                    this.vl((d) => d.dg = this.amj);
                    break;
            }
        }
        get amo() {
            return this.amm;
        }
        set amo(a) {
            let b = this.amo;
            if (a != b) {
                this.amm = a;
                this.wn("TransitionInDuration", b, this.amo);
            }
        }
        get amp() {
            return this.amn;
        }
        set amp(a) {
            let b = this.amp;
            if (a != b) {
                this.amn = a;
                this.wn("TransitionOutDuration", b, this.amp);
            }
        }
        get ami() {
            return this.amg;
        }
        set ami(a) {
            let b = this.ami;
            if (a != b) {
                this.amg = a;
                this.wn("TransitionInEasingFunction", b, this.ami);
            }
        }
        get amj() {
            return this.amh;
        }
        set amj(a) {
            let b = this.amj;
            if (a != b) {
                this.amh = a;
                this.wn("TransitionOutEasingFunction", b, this.amj);
            }
        }
        amr() {
            let cvd_ = this.mc();
            cvd_.scaleByViewport();
            return (cvd_.serialize());
        }
        get_h7() {
            return ((() => {
                let $ret = new List$1(DataSeriesType_$type, 0);
                $ret.add(35);
                return $ret;
            })());
        }
        get h7() {
            return this.get_h7();
        }
        get_h6() {
            return ((() => {
                let $ret = new List$1(IDataSeriesAdapterRule_$type, 0);
                $ret.add(new SimplePieSeriesRule());
                $ret.add(new SubCollectionsRule());
                return $ret;
            })());
        }
        get h6() {
            return this.get_h6();
        }
        get_aja() {
            return false;
        }
        bf(a) {
            if (this.amd == 0) {
                return a.suggestedSeries;
            }
            if (this.amd == 1) {
                return 35;
            }
            return 35;
        }
        dd(a, b) {
            let c = super.dd(a, b);
            return c;
        }
        vr(a, b) {
            super.vr(a, b);
        }
        vx(a, b) {
            super.vx(a, b);
            let c = typeCast(RadialBase.$, a);
            if (c == null) {
                return;
            }
            c.z1 = this.aml;
            c.zd = this.amb;
            c.c6 = this.amf;
        }
        u1(a, b) {
            super.u1(a, b);
            let c = typeCast(RadialPieSeries.$, a);
            if (c != null) {
                c.xk = this.c3(a, b);
            }
        }
        c2(a) {
            return 13;
        }
        wn(a, b, c) {
            super.wn(a, b, c);
            switch (a) {
                case "ChartType":
                    this.vi();
                    break;
                case "IsTransitionInEnabled":
                    this.vg((d) => {
                        let e = typeCast(RadialBase.$, d);
                        if (e == null) {
                            return;
                        }
                        e.z1 = c;
                    });
                    break;
                case "TransitionInMode":
                    this.vg((d) => {
                        let e = typeCast(RadialBase.$, d);
                        if (e == null) {
                            return;
                        }
                        e.zd = EnumUtil.getEnumValue(CategoryTransitionInMode_$type, c);
                    });
                    break;
                case "TransitionInSpeedType":
                    this.vg((d) => {
                        let e = typeCast(RadialBase.$, d);
                        if (e == null) {
                            return;
                        }
                        e.c6 = EnumUtil.getEnumValue(TransitionInSpeedType_$type, c);
                    });
                    break;
            }
        }
        get_cc() {
            return 4;
        }
        get cc() {
            return this.get_cc();
        }
        get amd() {
            return this.amc;
        }
        set amd(a) {
            if (a != this.amc) {
                let b = this.amd;
                this.amc = a;
                this.wn("ChartType", enumGetBox(DataPieChartType_$type, b), enumGetBox(DataPieChartType_$type, this.amd));
            }
        }
        get aml() {
            return this.amk;
        }
        set aml(a) {
            let b = this.aml;
            if (a != b) {
                this.amk = a;
                this.wn("IsTransitionInEnabled", b, this.aml);
            }
        }
        get amb() {
            return this.ama;
        }
        set amb(a) {
            let b = this.amb;
            if (a != b) {
                this.ama = a;
                this.wn("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.amb));
            }
        }
        get amf() {
            return this.ame;
        }
        set amf(a) {
            let b = this.amf;
            if (a != b) {
                this.ame = a;
                this.wn("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.amf));
            }
        }
    }
    DataPieChart.$t = markType(DataPieChart, 'DataPieChart', DataPieBaseChart.$);
    return DataPieChart;
})();
