/*
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 { AnchoredRadialSeries } from "./AnchoredRadialSeries";
import { UnknownValuePlotting_$type } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { Array_$type, Point_$type, runOn, enumGetBox, markType, markDep } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ViewportUtils } from "./ViewportUtils";
import { PropertyMetadata } from "igniteui-react-core";
import { AnchoredRadialSeriesView } from "./AnchoredRadialSeriesView";
import { Defaults } from "./Defaults";
/**
 * @hidden
 */
var RadialAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(RadialAreaSeries, _super);
    function RadialAreaSeries() {
        var _this = _super.call(this) || this;
        _this.ab = RadialAreaSeries.$;
        return _this;
    }
    RadialAreaSeries.prototype.get_d8 = function () {
        return true;
    };
    RadialAreaSeries.prototype.cg = function () {
        return new RadialAreaSeriesView(this);
    };
    RadialAreaSeries.prototype.o0 = function (a) {
        _super.prototype.o0.call(this, a);
        this.x9 = a;
    };
    RadialAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    RadialAreaSeries.prototype.nj = function (a, b) {
        _super.prototype.nj.call(this, a, b);
        this.x9.c4();
    };
    RadialAreaSeries.prototype.wo = function (a, b) {
        _super.prototype.wo.call(this, a, b);
        var c = b.by;
        var d = b.bx;
        var e = b;
        if (b.o() && !c.isEmpty && !d.isEmpty && this.vi != null && this.vp != 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.vq.d(a.f._inner[j][0], a.f._inner[j][1], c, d);
                k[1] = this.vq.e(a.f._inner[j][0], a.f._inner[j][1], c, d);
                k[2] = this.vq.d(a.f._inner[j][0], a.f._inner[j][2], c, d);
                var l = a.f._inner[j][2];
                k[3] = this.vq.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.x8 = { $type: Point_$type, x: m, y: n };
            var o = this.getEffectiveViewport1(e);
            this.vw.a2(this, this.v8(), runOn(this, this.vf), this.wb(b), this.wc(b));
            var p = false;
            var q = this.vw.b;
            if (q != null) {
                p = true;
            }
            if (p) {
                var r = new ScalerParams(0, b.by, b.bx, this.vi.ch, o);
                this.xq(f, -1, this.w2.count, this.vi, r, b.q);
            }
            var s = e.dc;
            var t = e.dd;
            var u = e.da;
            var v = e.db;
            this.vw.ad(s, true, false, true, true);
            this.vw.ad(t, true, false, true, true);
            this.vw.ad(u, false, true, false, false);
            this.vw.ad(v, false, true, false, false);
            e.c5(a.f.count, h, false, this.x9.cv.b, this.hj, runOn(this, this.xr), this.ya);
            u._opacity = this.vw.j * this.hf;
            v._opacity = 0.5 * this.vw.j * this.hf;
        }
    };
    RadialAreaSeries.prototype.o8 = function (a, b, c, d) {
        _super.prototype.o8.call(this, a, b, c, d);
        switch (b) {
            case RadialAreaSeries.$$p[0]:
                this.pp(false);
                this.ol();
                break;
        }
    };
    RadialAreaSeries.prototype.get_w5 = function () {
        return true;
    };
    RadialAreaSeries.$t = markType(RadialAreaSeries, 'RadialAreaSeries', AnchoredRadialSeries.$);
    RadialAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, RadialAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:ya:yc', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return RadialAreaSeries;
}(AnchoredRadialSeries));
export { RadialAreaSeries };
/**
 * @hidden
 */
var RadialAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(RadialAreaSeriesView, _super);
    function RadialAreaSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.c3 = null;
        _this.da = new Path();
        _this.dc = new Path();
        _this.db = new Path();
        _this.dd = new Path();
        _this.c6 = new Path();
        _this.c8 = new Path();
        _this.c7 = new Path();
        _this.c9 = new Path();
        _this.c3 = a;
        return _this;
    }
    RadialAreaSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.c3.ua = Defaults.e;
        }
    };
    RadialAreaSeriesView.prototype.c4 = function () {
        this.da.an = null;
        this.dc.an = null;
        this.db.an = null;
        this.dd.an = null;
        this.c6.an = null;
        this.c8.an = null;
        this.c7.an = null;
        this.c9.an = null;
        this.as();
    };
    RadialAreaSeriesView.prototype.c5 = function (a, b, c, d, e, f, g) {
        this.cz.wx.i(this.da, this.dc, this.db, this.dd, a, b, c, d, e, f, g);
        this.as();
    };
    RadialAreaSeriesView.prototype.bd = function () {
        _super.prototype.bd.call(this);
    };
    RadialAreaSeriesView.prototype.be = function () {
        _super.prototype.be.call(this);
        var a = this.br();
        this.c8.an = this.dc.an;
        this.c9.an = this.dd.an;
        this.c6.an = this.da.an;
        this.c7.an = this.db.an;
        this.c8._stroke = a;
        this.c8.ad = this.e.hk + 3;
        this.c9._stroke = a;
        this.c9.ad = this.e.hk + 3;
        this.c6._fill = a;
        this.c6._opacity = 1;
        this.c7._fill = a;
        this.c7._opacity = 1;
    };
    RadialAreaSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.c6);
                a.t(this.c7);
                a.t(this.c8);
                a.t(this.c9);
            }
            else {
                a.t(this.da);
                a.t(this.db);
                a.t(this.dc);
                a.t(this.dd);
            }
        }
    };
    RadialAreaSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.a9.exportPathData(a, this.dc, "lowerShape", ["Lower"]);
        this.e.a9.exportPathData(a, this.dd, "upperShape", ["Upper", "Main"]);
        this.e.a9.exportPathData(a, this.db, "translucentShape", ["Translucent"]);
        this.e.a9.exportPathData(a, this.da, "fillShape", ["Fill"]);
    };
    RadialAreaSeriesView.$t = markType(RadialAreaSeriesView, 'RadialAreaSeriesView', AnchoredRadialSeriesView.$);
    return RadialAreaSeriesView;
}(AnchoredRadialSeriesView));
export { RadialAreaSeriesView };
