/*
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.bj = function () {
        return new PolarSplineAreaSeries();
    };
    PolarSplineAreaSeries.prototype.zw = function () {
        return false;
    };
    PolarSplineAreaSeries.prototype.get_eu = function () {
        return true;
    };
    PolarSplineAreaSeries.prototype.get_f0 = function () {
        return true;
    };
    PolarSplineAreaSeries.prototype.cs = function () {
        return new PolarSplineAreaSeriesView(this);
    };
    PolarSplineAreaSeries.prototype.qz = function (a) {
        _super.prototype.qz.call(this, a);
        this.acs = a;
    };
    PolarSplineAreaSeries.prototype.acq = function (a) {
        var b = a;
        b.da();
    };
    PolarSplineAreaSeries.prototype.acr = function (a, b) {
        this.acq(b);
        if (a.m.count < 1) {
            return;
        }
        var c = b;
        c.db(a.m, this.act);
        this.y3.az(this, this.zv(), runOn(this, this.yl));
        var d = false;
        var e = this.y3.b;
        if (e != null) {
            d = true;
        }
        if (d) {
            this.aba(-1, this.zh.count, b.q);
        }
        var f = c.dh;
        var g = c.dg;
        this.y3.ad(f, true, false, true, true);
        this.y3.ad(g, false, true, false, false);
        g._opacity = this.y3.j * this.h9;
    };
    PolarSplineAreaSeries.prototype.get_acn = function () {
        return true;
    };
    PolarSplineAreaSeries.prototype.q7 = function (a, b, c, d) {
        _super.prototype.q7.call(this, a, b, c, d);
        switch (b) {
            case PolarSplineAreaSeries.$$p[0]:
                this.rp(false);
                break;
        }
    };
    PolarSplineAreaSeries.$t = markType(PolarSplineAreaSeries, 'PolarSplineAreaSeries', PolarLineSeriesBase.$);
    PolarSplineAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarSplineAreaSeries, 'raisePropertyChanged', ['Stiffness:act:acv', [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.c9 = null;
        _this.df = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _this.de = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _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.c9 = a;
        return _this;
    }
    PolarSplineAreaSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.c9.w8 = Defaults.e;
        }
    };
    Object.defineProperty(PolarSplineAreaSeriesView.prototype, "dg", {
        get: function () {
            return this.de;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PolarSplineAreaSeriesView.prototype, "dh", {
        get: function () {
            return this.df;
        },
        enumerable: false,
        configurable: true
    });
    PolarSplineAreaSeriesView.prototype.da = function () {
        Extensions.e(this.de.an);
        Extensions.e(this.df.an);
        Extensions.e(this.dc.an);
        Extensions.e(this.dd.an);
        this.as();
    };
    PolarSplineAreaSeriesView.prototype.db = function (a, b) {
        this.df.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.de.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.dc.an = this.de.an;
        this.dd.an = this.df.an;
        this.dc._fill = a;
        this.dc._opacity = 1;
        this.dd._stroke = a;
        this.dd.ad = this.e.ie + 3;
    };
    PolarSplineAreaSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dc);
                a.t(this.dd);
            }
            else {
                a.t(this.de);
                a.t(this.df);
            }
        }
    };
    PolarSplineAreaSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.bc.exportPathData(a, this.df, "polarShape", ["Main"]);
        this.e.bc.exportPathData(a, this.de, "fillShape", ["Fill"]);
    };
    PolarSplineAreaSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.vz = a;
        this.e.jm = 5;
        this.e.jn = 5;
        this.e.jo = 5;
    };
    PolarSplineAreaSeriesView.$t = markType(PolarSplineAreaSeriesView, 'PolarSplineAreaSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineAreaSeriesView;
}(PolarLineSeriesBaseView));
export { PolarSplineAreaSeriesView };
