/*
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 { AnchoredRadialSeries } from "./AnchoredRadialSeries";
import { UnknownValuePlotting_$type } from "igniteui-react-core/ES5/UnknownValuePlotting";
import { DependencyProperty } from "igniteui-react-core/ES5/DependencyProperty";
import { Type, Array_$type, Point_$type, runOn, enumGetBox, markType } from "igniteui-react-core/ES5/type";
import { List$1 } from "igniteui-react-core/ES5/List$1";
import { ViewportUtils } from "./ViewportUtils";
import { Path } from "igniteui-react-core/ES5/Path";
import { PropertyMetadata } from "igniteui-react-core/ES5/PropertyMetadata";
import { AnchoredRadialSeriesView } from "./AnchoredRadialSeriesView";
/**
 * @hidden
 */
var RadialAreaSeries = /** @class */ (function (_super) {
    tslib_1.__extends(RadialAreaSeries, _super);
    function RadialAreaSeries() {
        var _this = _super.call(this) || this;
        _this.ab = RadialAreaSeries.$;
        return _this;
    }
    RadialAreaSeries.prototype.bf = function () {
        return new RadialAreaSeriesView(this);
    };
    RadialAreaSeries.prototype.im = function (a) {
        _super.prototype.im.call(this, a);
        this.oj = a;
    };
    RadialAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    RadialAreaSeries.prototype.hp = function (a, b) {
        _super.prototype.hp.call(this, a, b);
        this.oj.cx();
    };
    RadialAreaSeries.prototype.ne = function (a, b) {
        _super.prototype.ne.call(this, a, b);
        var c = b.bs;
        var d = b.br;
        var e = b;
        if (b.l() && !c.isEmpty && !d.isEmpty && this.mt != null && this.mv != null) {
            var f = a.f;
            var g = f.count;
            var h = new List$1(Array_$type, 2, g);
            var i = 0;
            for (var j = 0; j < g; j++) {
                var k = new Array(4);
                h.add(k);
                k[0] = this.mw.d(a.f._inner[j][0], a.f._inner[j][1], c, d);
                k[1] = this.mw.e(a.f._inner[j][0], a.f._inner[j][1], c, d);
                k[2] = this.mw.d(a.f._inner[j][0], a.f._inner[j][2], c, d);
                var l = a.f._inner[j][2];
                k[3] = this.mw.e(a.f._inner[j][0], l, c, d);
                if (l > i) {
                    i = l;
                }
            }
            var m = ViewportUtils.c(0.5, c, d);
            var n = ViewportUtils.f(0.5, c, d);
            this.oi = { $type: Point_$type, x: m, y: n };
            e.cy(a.f.count, h, false, this.oj.co.b, this.er, runOn(this, this.n4), this.ok);
            e.cz._opacity = this.d3;
            e.c0._opacity = this.d3 * 0.5;
        }
    };
    RadialAreaSeries.prototype.is = function (a, b, c, d) {
        _super.prototype.is.call(this, a, b, c, d);
        switch (b) {
            case RadialAreaSeries.$$p[0]:
                this.i6(false);
                this.ic();
                break;
        }
    };
    RadialAreaSeries.prototype.get_ns = function () {
        return true;
    };
    RadialAreaSeries.$t = markType(RadialAreaSeries, 'RadialAreaSeries', AnchoredRadialSeries.$);
    return RadialAreaSeries;
}(AnchoredRadialSeries));
export { RadialAreaSeries };
Type.dep(DependencyProperty, PropertyMetadata, RadialAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:ok:om', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
/**
 * @hidden
 */
var RadialAreaSeriesView = /** @class */ (function (_super) {
    tslib_1.__extends(RadialAreaSeriesView, _super);
    function RadialAreaSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.cw = null;
        _this.cz = new Path();
        _this.c1 = new Path();
        _this.c0 = new Path();
        _this.c2 = new Path();
        _this.cw = a;
        return _this;
    }
    RadialAreaSeriesView.prototype.ap = function () {
        _super.prototype.ap.call(this);
        if (!this.n) {
            this.e.er = 4;
            this.e.bj = 1;
        }
    };
    RadialAreaSeriesView.prototype.cx = function () {
        this.cz.aj = null;
        this.c1.aj = null;
        this.c0.aj = null;
        this.c2.aj = null;
        this.an();
    };
    RadialAreaSeriesView.prototype.cy = function (a, b, c, d, e, f, g) {
        this.cs.nk.i(this.cz, this.c1, this.c0, this.c2, a, b, c, d, e, f, g);
        this.an();
    };
    RadialAreaSeriesView.prototype.a8 = function () {
        _super.prototype.a8.call(this);
        this.cz._fill = this.e.kw;
        this.cz._opacity = this.e.d3;
        this.c0._fill = this.e.kw;
        this.c0._opacity = this.e.d3 * 0.5;
        this.c1._stroke = this.e.kx;
        this.c1.ac = this.e.ev;
        this.c1.ai = this.e.k4;
        this.c1.ad = this.e.k5;
        this.c2._stroke = this.e.kx;
        this.c2.ac = this.e.ev;
        this.c2.ai = this.e.k4;
        this.c2.ad = this.e.k5;
    };
    RadialAreaSeriesView.prototype.a9 = function () {
        _super.prototype.a9.call(this);
        var a = this.bl();
        this.c1._stroke = a;
        this.c1.ac = this.e.ev + 3;
        this.c2._stroke = a;
        this.c2.ac = this.e.ev + 3;
        this.cz._fill = a;
        this.cz._opacity = 1;
        this.c0._fill = a;
        this.c0._opacity = 1;
    };
    RadialAreaSeriesView.prototype.a3 = function (a, b) {
        _super.prototype.a3.call(this, a, b);
        if (a.d) {
            a.s(this.cz);
            a.s(this.c0);
            a.s(this.c1);
            a.s(this.c2);
        }
    };
    RadialAreaSeriesView.prototype.ai = function (a) {
        _super.prototype.ai.call(this, a);
        this.e.a2.exportPathData(a, this.c1, "lowerShape", ["Lower"]);
        this.e.a2.exportPathData(a, this.c2, "upperShape", ["Upper", "Main"]);
        this.e.a2.exportPathData(a, this.c0, "translucentShape", ["Translucent"]);
        this.e.a2.exportPathData(a, this.cz, "fillShape", ["Fill"]);
    };
    RadialAreaSeriesView.$t = markType(RadialAreaSeriesView, 'RadialAreaSeriesView', AnchoredRadialSeriesView.$);
    return RadialAreaSeriesView;
}(AnchoredRadialSeriesView));
export { RadialAreaSeriesView };
