/*
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 { __extends } from "tslib";
import { DataPieBaseChart } from "./DataPieBaseChart";
import { typeCast, enumGetBox, markType } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { DataSeriesType_$type } from "igniteui-react-core";
import { IDataSeriesAdapterRule_$type } from "igniteui-react-core";
import { SimplePieSeriesRule } from "igniteui-react-core";
import { SubCollectionsRule } from "igniteui-react-core";
import { DataPieChartType_$type } from "./DataPieChartType";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { TransitionInSpeedType_$type } from "./TransitionInSpeedType";
import { BrushUtil } from "igniteui-react-core";
import { AxisDefaults } from "./AxisDefaults";
import { Defaults } from "./Defaults";
import { DeviceUtils } from "igniteui-react-core";
import { RadialBase } from "./RadialBase";
import { RadialPieSeries } from "./RadialPieSeries";
/**
 * @hidden
 */
var DataPieChart = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(DataPieChart, _super);
    function DataPieChart() {
        var _this = _super.call(this) || this;
        _this.aku = 1000;
        _this.akv = 1000;
        _this.ako = null;
        _this.akp = null;
        _this.akk = 0;
        _this.aks = true;
        _this.aki = 0;
        _this.akm = 3;
        _this.ui();
        return _this;
    }
    DataPieChart.prototype.u2 = function () {
        _super.prototype.u2.call(this);
        if (this.dataChart == null) {
            return;
        }
        var a = this.dataChart.c9.j.e();
        if (this.af8 == null) {
            this.af8 = a.k;
        }
        if (this.agf == null) {
            this.agf = a.k;
        }
        this.ab7 = 0;
        this.agg = BrushUtil.h(0, 0, 0, 0);
        this.agj = BrushUtil.h(0, 0, 0, 0);
        this.agc = BrushUtil.h(0, 0, 0, 0);
        this.af9 = BrushUtil.h(0, 0, 0, 0);
        this.abm = 0;
        this.agd = BrushUtil.h(0, 0, 0, 0);
        this.abn = AxisDefaults.e;
        this.agu = 1;
        this.agv = 1;
        this.crosshairsDisplayMode = 1;
        this.gl = true;
        this.jj = Defaults.j;
        this.x9 = Defaults.ae;
        this.x4 = Defaults.af;
        this.x5 = Defaults.ag;
        this.autoCalloutsVisible = true;
        this.hi = true;
        this.g1 = false;
        this.g9 = false;
        this.bz = 1;
        this.bv = 11;
        this.akt = true;
        this.xy = BrushUtil.h(255, 255, 255, 255);
        this.ji = DeviceUtils.g(2);
        this.gj = true;
        this.gh = true;
        this.ge = true;
        this.dk = 4;
        this.di = 4;
    };
    DataPieChart.prototype.u4 = function (a, b) {
        _super.prototype.u4.call(this, a, b);
        a.ke = this.akw;
        a.kf = this.akx;
        a.de = this.akq;
        a.df = this.akr;
    };
    DataPieChart.prototype.vu = function (a, b, c) {
        var _this = this;
        _super.prototype.vu.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.ur(function (d) { return d.ke = _this.akw; });
                break;
            case "TransitionOutDuration":
                this.ur(function (d) { return d.kf = _this.akx; });
                break;
            case "TransitionInEasingFunction":
                this.ur(function (d) { return d.de = _this.akq; });
                break;
            case "TransitionOutEasingFunction":
                this.ur(function (d) { return d.df = _this.akr; });
                break;
        }
    };
    Object.defineProperty(DataPieChart.prototype, "akw", {
        get: function () {
            return this.aku;
        },
        set: function (a) {
            var b = this.akw;
            if (a != b) {
                this.aku = a;
                this.vr("TransitionInDuration", b, this.akw);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DataPieChart.prototype, "akx", {
        get: function () {
            return this.akv;
        },
        set: function (a) {
            var b = this.akx;
            if (a != b) {
                this.akv = a;
                this.vr("TransitionOutDuration", b, this.akx);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DataPieChart.prototype, "akq", {
        get: function () {
            return this.ako;
        },
        set: function (a) {
            var b = this.akq;
            if (a != b) {
                this.ako = a;
                this.vr("TransitionInEasingFunction", b, this.akq);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DataPieChart.prototype, "akr", {
        get: function () {
            return this.akp;
        },
        set: function (a) {
            var b = this.akr;
            if (a != b) {
                this.akp = a;
                this.vr("TransitionOutEasingFunction", b, this.akr);
            }
        },
        enumerable: false,
        configurable: true
    });
    DataPieChart.prototype.akz = function () {
        var cvd_ = this.ls();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    DataPieChart.prototype.get_hv = function () {
        return ((function () {
            var $ret = new List$1(DataSeriesType_$type, 0);
            $ret.add(34);
            return $ret;
        })());
    };
    Object.defineProperty(DataPieChart.prototype, "hv", {
        get: function () {
            return this.get_hv();
        },
        enumerable: false,
        configurable: true
    });
    DataPieChart.prototype.get_hu = function () {
        return ((function () {
            var $ret = new List$1(IDataSeriesAdapterRule_$type, 0);
            $ret.add(new SimplePieSeriesRule());
            $ret.add(new SubCollectionsRule());
            return $ret;
        })());
    };
    Object.defineProperty(DataPieChart.prototype, "hu", {
        get: function () {
            return this.get_hu();
        },
        enumerable: false,
        configurable: true
    });
    DataPieChart.prototype.get_ahu = function () {
        return false;
    };
    DataPieChart.prototype.be = function (a) {
        if (this.akl == 0) {
            return a.suggestedSeries;
        }
        if (this.akl == 1) {
            return 34;
        }
        return 34;
    };
    DataPieChart.prototype.dc = function (a, b) {
        var c = _super.prototype.dc.call(this, a, b);
        return c;
    };
    DataPieChart.prototype.ux = function (a, b) {
        _super.prototype.ux.call(this, a, b);
    };
    DataPieChart.prototype.u3 = function (a, b) {
        _super.prototype.u3.call(this, a, b);
        var c = typeCast(RadialBase.$, a);
        if (c == null) {
            return;
        }
        c.zr = this.akt;
        c.y1 = this.akj;
        c.c5 = this.akn;
    };
    DataPieChart.prototype.t7 = function (a, b) {
        _super.prototype.t7.call(this, a, b);
        var c = typeCast(RadialPieSeries.$, a);
        if (c != null) {
            c.w8 = this.c2(a, b);
        }
    };
    DataPieChart.prototype.c1 = function (a) {
        return 13;
    };
    DataPieChart.prototype.vr = function (a, b, c) {
        _super.prototype.vr.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.uo();
                break;
        }
    };
    DataPieChart.prototype.get_cb = function () {
        return 4;
    };
    Object.defineProperty(DataPieChart.prototype, "cb", {
        get: function () {
            return this.get_cb();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DataPieChart.prototype, "akl", {
        get: function () {
            return this.akk;
        },
        set: function (a) {
            if (a != this.akk) {
                var b = this.akl;
                this.akk = a;
                this.vr("ChartType", enumGetBox(DataPieChartType_$type, b), enumGetBox(DataPieChartType_$type, this.akl));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DataPieChart.prototype, "akt", {
        get: function () {
            return this.aks;
        },
        set: function (a) {
            var b = this.akt;
            if (a != b) {
                this.aks = a;
                this.vr("IsTransitionInEnabled", b, this.akt);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DataPieChart.prototype, "akj", {
        get: function () {
            return this.aki;
        },
        set: function (a) {
            var b = this.akj;
            if (a != b) {
                this.aki = a;
                this.vr("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.akj));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DataPieChart.prototype, "akn", {
        get: function () {
            return this.akm;
        },
        set: function (a) {
            var b = this.akn;
            if (a != b) {
                this.akm = a;
                this.vr("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.akn));
            }
        },
        enumerable: false,
        configurable: true
    });
    DataPieChart.$t = markType(DataPieChart, 'DataPieChart', DataPieBaseChart.$);
    return DataPieChart;
}(DataPieBaseChart));
export { DataPieChart };
