/*
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 * as tslib_1 from "tslib";
import { RingSeriesBase } from "./RingSeriesBase";
import { Ring } from "./Ring";
import { ArcItem } from "./ArcItem";
import { fromEnum, markType } from "igniteui-react-core/ES5/type";
import { RingCollection } from "./RingCollection";
/**
 * @hidden
 */
var RingSeries = /** @class */ (function (_super) {
    tslib_1.__extends(RingSeries, _super);
    function RingSeries() {
        var _this = _super.call(this) || this;
        _this.dr = null;
        _this.dr = ((function () {
            var $ret = new Ring();
            $ret.c = _this;
            $ret.e = false;
            return $ret;
        })());
        var a = ((function () {
            var $ret = new ArcItem();
            $ret.k = _this.a4;
            $ret.d = _this.dr;
            $ret.n = _this.b7;
            $ret.c = _this.al;
            $ret.j = _this.a2;
            return $ret;
        })());
        _this.dr.g.add(a);
        _this.ab = RingSeries.$;
        return _this;
    }
    RingSeries.prototype.cj = function (a, b, c, d) {
        _super.prototype.cj.call(this, a, b, c, d);
        if (b == RingSeriesBase.$$p[2]) {
            for (var e = 0; e < this.dr.ringControl.arcs.count; e++) {
                this.dr.ringControl.arcs.item(e).at = d;
            }
        }
        if (b == RingSeriesBase.$$p[3]) {
            for (var f = 0; f < this.dr.ringControl.arcs.count; f++) {
                this.dr.ringControl.arcs.item(f).au = d;
            }
        }
        if (b == RingSeriesBase.$$p[14]) {
            for (var g = 0; g < this.dr.ringControl.arcs.count; g++) {
                this.dr.ringControl.arcs.item(g).dv = this.bp;
            }
        }
        if (b == RingSeriesBase.$$p[0]) {
            this.ch();
        }
        if (b == RingSeriesBase.$$p[23]) {
            if (this.dr.g != null && this.dr.g.count > 0) {
                this.dr.g._inner[0].k = this.a4;
            }
        }
        if (b == RingSeriesBase.$$p[26]) {
            if (this.dr.g != null && this.dr.g.count > 0) {
                this.dr.g._inner[0].n = this.b7;
                this.ci();
            }
        }
        if (this.dr != null && this.as.e()) {
            this.dr.o();
            if (this.dr.f()) {
                this.dr.c.as.l();
            }
        }
    };
    RingSeries.prototype.aq = function () {
        var a = new RingCollection();
        if (this.dr.g._inner[0].g.count > 0) {
            a.add(this.dr);
        }
        return a;
    };
    RingSeries.prototype.ci = function () {
        if (this.dr != null) {
            this.dr.g._inner[0].h = this.itemsSource;
            this.dr.g._inner[0].p(this.a4);
            if (this.at != null) {
                this.at.bv();
                this.at.b0();
            }
        }
    };
    RingSeries.prototype.ch = function () {
        if (this.dr != null) {
            this.dr.g._inner[0].a = this.ag;
        }
    };
    RingSeries.prototype.cn = function () {
        if (this.dr != null) {
            this.width = this.dr.q.width;
            this.height = this.dr.q.height;
            this.as.m(this.dr.p.x, this.dr.p.y);
        }
    };
    RingSeries.prototype.cm = function () {
        var e_1, _a;
        if (this.dr != null) {
            try {
                for (var _b = tslib_1.__values(fromEnum(this.dr.ringControl.arcs.a)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var a = _c.value;
                    a.fe();
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
                }
                finally { if (e_1) throw e_1.error; }
            }
        }
    };
    RingSeries.prototype.cd = function (a, b) {
        _super.prototype.cd.call(this, a, b);
        if (this.dr != null) {
            this.dr.l(this.itemsSource, a, b);
        }
    };
    RingSeries.prototype.cc = function () {
        _super.prototype.cc.call(this);
        if (this.dr != null) {
            this.dr.k(this.itemsSource);
        }
    };
    RingSeries.prototype.ce = function (a, b) {
        _super.prototype.ce.call(this, a, b);
        if (this.dr != null) {
            this.dr.m(this.itemsSource, a, b);
        }
    };
    RingSeries.prototype.cf = function (a, b, c) {
        _super.prototype.cf.call(this, a, b, c);
        if (this.dr != null) {
            this.dr.n(this.itemsSource, a, b, c);
        }
    };
    RingSeries.$t = markType(RingSeries, 'RingSeries', RingSeriesBase.$);
    return RingSeries;
}(RingSeriesBase));
export { RingSeries };
