/*
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 { PolarLineSeriesBase } from "./PolarLineSeriesBase";
import { DependencyProperty } from "igniteui-angular-core";
import { runOn, markType, markDep } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { PolarLineSeriesBaseView } from "./PolarLineSeriesBaseView";
import { PathGeometry } from "igniteui-angular-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-angular-core";
import { Numeric } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
var PolarSplineAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(PolarSplineAreaSeries, _super);
    function PolarSplineAreaSeries() {
        var _this = _super.call(this) || this;
        _this.ab = PolarSplineAreaSeries.$;
        return _this;
    }
    PolarSplineAreaSeries.prototype.get_dd = function () {
        return true;
    };
    PolarSplineAreaSeries.prototype.get_eg = function () {
        return true;
    };
    PolarSplineAreaSeries.prototype.bx = function () {
        return new PolarSplineAreaSeriesView(this);
    };
    PolarSplineAreaSeries.prototype.ly = function (a) {
        _super.prototype.ly.call(this, a);
        this.vf = a;
    };
    PolarSplineAreaSeries.prototype.vd = function (a) {
        var b = a;
        b.c5();
    };
    PolarSplineAreaSeries.prototype.ve = function (a, b) {
        this.vd(b);
        if (a.m.count < 1) {
            return;
        }
        var c = b;
        c.c6(a.m, this.vg);
        this.r5.ax(this, this.ss(), runOn(this, this.ri));
        var d = false;
        var e = this.r5.b;
        if (e != null) {
            d = true;
        }
        if (d) {
            this.t0(-1, this.se.count, b.q);
        }
        var f = c.dc;
        var g = c.db;
        this.r5.ad(f, true, false, true, true);
        this.r5.ad(g, false, true, false, false);
        g._opacity = this.r5.j * this.fq;
    };
    PolarSplineAreaSeries.prototype.get_va = function () {
        return true;
    };
    PolarSplineAreaSeries.prototype.l3 = function (a, b, c, d) {
        _super.prototype.l3.call(this, a, b, c, d);
        switch (b) {
            case PolarSplineAreaSeries.$$p[0]:
                this.mh(false);
                break;
        }
    };
    PolarSplineAreaSeries.$t = markType(PolarSplineAreaSeries, 'PolarSplineAreaSeries', PolarLineSeriesBase.$);
    PolarSplineAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarSplineAreaSeries, 'raisePropertyChanged', ['Stiffness:vg:vi', [1, 0.5]]);
    return PolarSplineAreaSeries;
}(PolarLineSeriesBase));
export { PolarSplineAreaSeries };
/**
 * @hidden
 */
var PolarSplineAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(PolarSplineAreaSeriesView, _super);
    function PolarSplineAreaSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.c4 = null;
        _this.da = ((function () {
            var $ret = new Path();
            $ret.ak = new PathGeometry();
            return $ret;
        })());
        _this.c9 = ((function () {
            var $ret = new Path();
            $ret.ak = new PathGeometry();
            return $ret;
        })());
        _this.c8 = ((function () {
            var $ret = new Path();
            $ret.ak = new PathGeometry();
            return $ret;
        })());
        _this.c7 = ((function () {
            var $ret = new Path();
            $ret.ak = new PathGeometry();
            return $ret;
        })());
        _this.c4 = a;
        return _this;
    }
    PolarSplineAreaSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.c4.qc = Defaults.e;
        }
    };
    Object.defineProperty(PolarSplineAreaSeriesView.prototype, "db", {
        get: function () {
            return this.c9;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PolarSplineAreaSeriesView.prototype, "dc", {
        get: function () {
            return this.da;
        },
        enumerable: false,
        configurable: true
    });
    PolarSplineAreaSeriesView.prototype.c5 = function () {
        Extensions.e(this.c9.ak);
        Extensions.e(this.da.ak);
        Extensions.e(this.c7.ak);
        Extensions.e(this.c8.ak);
        this.aq();
    };
    PolarSplineAreaSeriesView.prototype.c6 = function (a, b) {
        this.da.ak.c = Numeric.h(a.count + 1, function (c) { return c < a.count ? a._inner[c].x : a._inner[c - a.count].x; }, function (c) { return c < a.count ? a._inner[c].y : a._inner[c - a.count].y; }, b);
        this.c9.ak.c = Numeric.h(a.count + 1, function (c) { return c < a.count ? a._inner[c].x : a._inner[c - a.count].x; }, function (c) { return c < a.count ? a._inner[c].y : a._inner[c - a.count].y; }, b);
        this.aq();
    };
    PolarSplineAreaSeriesView.prototype.bb = function () {
        _super.prototype.bb.call(this);
    };
    PolarSplineAreaSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        var a = this.bo();
        this.c7.ak = this.c9.ak;
        this.c8.ak = this.da.ak;
        this.c7._fill = a;
        this.c7._opacity = 1;
        this.c8._stroke = a;
        this.c8.ac = this.e.fu + 3;
    };
    PolarSplineAreaSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (a.d) {
            if (b) {
                a.s(this.c7);
                a.s(this.c8);
            }
            else {
                a.s(this.c9);
                a.s(this.da);
            }
        }
    };
    PolarSplineAreaSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a8.exportPathData(a, this.da, "polarShape", ["Main"]);
        this.e.a8.exportPathData(a, this.c9, "fillShape", ["Fill"]);
    };
    PolarSplineAreaSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.pa = a;
        this.e.gw = 5;
        this.e.gx = 5;
        this.e.gy = 5;
    };
    PolarSplineAreaSeriesView.$t = markType(PolarSplineAreaSeriesView, 'PolarSplineAreaSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineAreaSeriesView;
}(PolarLineSeriesBaseView));
export { PolarSplineAreaSeriesView };
