/*
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-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { Array_$type, Point_$type, runOn, enumGetBox, markType, markDep } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { ViewportUtils } from "./ViewportUtils";
import { PropertyMetadata } from "igniteui-angular-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_df = function () {
        return true;
    };
    RadialAreaSeries.prototype.by = function () {
        return new RadialAreaSeriesView(this);
    };
    RadialAreaSeries.prototype.l4 = function (a) {
        _super.prototype.l4.call(this, a);
        this.uf = a;
    };
    RadialAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    RadialAreaSeries.prototype.k2 = function (a, b) {
        _super.prototype.k2.call(this, a, b);
        this.uf.c1();
    };
    RadialAreaSeries.prototype.sy = function (a, b) {
        _super.prototype.sy.call(this, a, b);
        var c = b.bv;
        var d = b.bu;
        var e = b;
        if (b.o() && !c.isEmpty && !d.isEmpty && this.rt != null && this.r0 != 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.r1.d(a.f._inner[j][0], a.f._inner[j][1], c, d);
                k[1] = this.r1.e(a.f._inner[j][0], a.f._inner[j][1], c, d);
                k[2] = this.r1.d(a.f._inner[j][0], a.f._inner[j][2], c, d);
                var l = a.f._inner[j][2];
                k[3] = this.r1.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.ue = { $type: Point_$type, x: m, y: n };
            var o = this.getEffectiveViewport1(e);
            this.r7.a2(this, this.sj(), runOn(this, this.rq), this.sl(b), this.sm(b));
            var p = false;
            var q = this.r7.b;
            if (q != null) {
                p = true;
            }
            if (p) {
                var r = new ScalerParams(0, b.bv, b.bu, this.rt.cg, o);
                this.tx(f, -1, this.tc.count, this.rt, r, b.q);
            }
            var s = e.c9;
            var t = e.da;
            var u = e.c7;
            var v = e.c8;
            this.r7.ad(s, true, false, true, true);
            this.r7.ad(t, true, false, true, true);
            this.r7.ad(u, false, true, false, false);
            this.r7.ad(v, false, true, false, false);
            e.c2(a.f.count, h, false, this.uf.cs.b, this.fx, runOn(this, this.ty), this.ug);
            u._opacity = this.r7.j * this.fu;
            v._opacity = 0.5 * this.r7.j * this.fu;
        }
    };
    RadialAreaSeries.prototype.l9 = function (a, b, c, d) {
        _super.prototype.l9.call(this, a, b, c, d);
        switch (b) {
            case RadialAreaSeries.$$p[0]:
                this.mn(false);
                this.lu();
                break;
        }
    };
    RadialAreaSeries.prototype.get_tf = function () {
        return true;
    };
    RadialAreaSeries.$t = markType(RadialAreaSeries, 'RadialAreaSeries', AnchoredRadialSeries.$);
    RadialAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, RadialAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:ug:ui', [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.c0 = null;
        _this.c7 = new Path();
        _this.c9 = new Path();
        _this.c8 = new Path();
        _this.da = new Path();
        _this.c3 = new Path();
        _this.c5 = new Path();
        _this.c4 = new Path();
        _this.c6 = new Path();
        _this.c0 = a;
        return _this;
    }
    RadialAreaSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.c0.ql = Defaults.e;
        }
    };
    RadialAreaSeriesView.prototype.c1 = function () {
        this.c7.an = null;
        this.c9.an = null;
        this.c8.an = null;
        this.da.an = null;
        this.c3.an = null;
        this.c5.an = null;
        this.c4.an = null;
        this.c6.an = null;
        this.aq();
    };
    RadialAreaSeriesView.prototype.c2 = function (a, b, c, d, e, f, g) {
        this.cw.s7.i(this.c7, this.c9, this.c8, this.da, a, b, c, d, e, f, g);
        this.aq();
    };
    RadialAreaSeriesView.prototype.bb = function () {
        _super.prototype.bb.call(this);
    };
    RadialAreaSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        var a = this.bo();
        this.c5.an = this.c9.an;
        this.c6.an = this.da.an;
        this.c3.an = this.c7.an;
        this.c4.an = this.c8.an;
        this.c5._stroke = a;
        this.c5.ad = this.e.fy + 3;
        this.c6._stroke = a;
        this.c6.ad = this.e.fy + 3;
        this.c3._fill = a;
        this.c3._opacity = 1;
        this.c4._fill = a;
        this.c4._opacity = 1;
    };
    RadialAreaSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.c3);
                a.t(this.c4);
                a.t(this.c5);
                a.t(this.c6);
            }
            else {
                a.t(this.c7);
                a.t(this.c8);
                a.t(this.c9);
                a.t(this.da);
            }
        }
    };
    RadialAreaSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a9.exportPathData(a, this.c9, "lowerShape", ["Lower"]);
        this.e.a9.exportPathData(a, this.da, "upperShape", ["Upper", "Main"]);
        this.e.a9.exportPathData(a, this.c8, "translucentShape", ["Translucent"]);
        this.e.a9.exportPathData(a, this.c7, "fillShape", ["Fill"]);
    };
    RadialAreaSeriesView.$t = markType(RadialAreaSeriesView, 'RadialAreaSeriesView', AnchoredRadialSeriesView.$);
    return RadialAreaSeriesView;
}(AnchoredRadialSeriesView));
export { RadialAreaSeriesView };
