/*
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-react-core";
import { runOn, markType, markDep } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { PolarLineSeriesBaseView } from "./PolarLineSeriesBaseView";
import { PathGeometry } from "igniteui-react-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-react-core";
import { Numeric } from "igniteui-react-core";
import { Color } from "igniteui-react-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.bc = function () {
        return new PolarSplineAreaSeries();
    };
    PolarSplineAreaSeries.prototype.wt = function () {
        return false;
    };
    PolarSplineAreaSeries.prototype.get_d9 = function () {
        return true;
    };
    PolarSplineAreaSeries.prototype.get_fe = function () {
        return true;
    };
    PolarSplineAreaSeries.prototype.cd = function () {
        return new PolarSplineAreaSeriesView(this);
    };
    PolarSplineAreaSeries.prototype.o2 = function (a) {
        _super.prototype.o2.call(this, a);
        this.zo = a;
    };
    PolarSplineAreaSeries.prototype.zm = function (a) {
        var b = a;
        b.c8();
    };
    PolarSplineAreaSeries.prototype.zn = function (a, b) {
        this.zm(b);
        if (a.m.count < 1) {
            return;
        }
        var c = b;
        c.c9(a.m, this.zp);
        this.v0.az(this, this.ws(), runOn(this, this.vi));
        var d = false;
        var e = this.v0.b;
        if (e != null) {
            d = true;
        }
        if (d) {
            this.x7(-1, this.we.count, b.q);
        }
        var f = c.df;
        var g = c.de;
        this.v0.ad(f, true, false, true, true);
        this.v0.ad(g, false, true, false, false);
        g._opacity = this.v0.j * this.hg;
    };
    PolarSplineAreaSeries.prototype.get_zj = function () {
        return true;
    };
    PolarSplineAreaSeries.prototype.pa = function (a, b, c, d) {
        _super.prototype.pa.call(this, a, b, c, d);
        switch (b) {
            case PolarSplineAreaSeries.$$p[0]:
                this.pr(false);
                break;
        }
    };
    PolarSplineAreaSeries.$t = markType(PolarSplineAreaSeries, 'PolarSplineAreaSeries', PolarLineSeriesBase.$);
    PolarSplineAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarSplineAreaSeries, 'raisePropertyChanged', ['Stiffness:zp:zr', [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.c7 = null;
        _this.dd = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _this.dc = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _this.db = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _this.da = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _this.c7 = a;
        return _this;
    }
    PolarSplineAreaSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.c7.uc = Defaults.e;
        }
    };
    Object.defineProperty(PolarSplineAreaSeriesView.prototype, "de", {
        get: function () {
            return this.dc;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PolarSplineAreaSeriesView.prototype, "df", {
        get: function () {
            return this.dd;
        },
        enumerable: false,
        configurable: true
    });
    PolarSplineAreaSeriesView.prototype.c8 = function () {
        Extensions.e(this.dc.an);
        Extensions.e(this.dd.an);
        Extensions.e(this.da.an);
        Extensions.e(this.db.an);
        this.as();
    };
    PolarSplineAreaSeriesView.prototype.c9 = function (a, b) {
        this.dd.an.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.dc.an.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.as();
    };
    PolarSplineAreaSeriesView.prototype.bd = function () {
        _super.prototype.bd.call(this);
    };
    PolarSplineAreaSeriesView.prototype.be = function () {
        _super.prototype.be.call(this);
        var a = this.br();
        this.da.an = this.dc.an;
        this.db.an = this.dd.an;
        this.da._fill = a;
        this.da._opacity = 1;
        this.db._stroke = a;
        this.db.ad = this.e.hl + 3;
    };
    PolarSplineAreaSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.da);
                a.t(this.db);
            }
            else {
                a.t(this.dc);
                a.t(this.dd);
            }
        }
    };
    PolarSplineAreaSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.a5.exportPathData(a, this.dd, "polarShape", ["Main"]);
        this.e.a5.exportPathData(a, this.dc, "fillShape", ["Fill"]);
    };
    PolarSplineAreaSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.s8 = a;
        this.e.is = 5;
        this.e.it = 5;
        this.e.iu = 5;
    };
    PolarSplineAreaSeriesView.$t = markType(PolarSplineAreaSeriesView, 'PolarSplineAreaSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineAreaSeriesView;
}(PolarLineSeriesBaseView));
export { PolarSplineAreaSeriesView };
