/*
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 { SplineSeriesBase } from "./SplineSeriesBase";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { typeCast, runOn, markType } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { SplineSeriesBaseView } from "./SplineSeriesBaseView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
var SplineAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineAreaSeries, _super);
    function SplineAreaSeries() {
        var _this = _super.call(this) || this;
        _this.z0 = null;
        _this.z0 = new CategoryLineRasterizer();
        _this.ab = SplineAreaSeries.$;
        return _this;
    }
    SplineAreaSeries.prototype.bc = function () {
        return new SplineAreaSeries();
    };
    SplineAreaSeries.prototype.get_d9 = function () {
        return true;
    };
    SplineAreaSeries.prototype.get_fe = function () {
        return true;
    };
    SplineAreaSeries.prototype.cd = function () {
        return new SplineAreaSeriesView(this);
    };
    SplineAreaSeries.prototype.vy = function () {
        return 1;
    };
    SplineAreaSeries.prototype.o2 = function (a) {
        _super.prototype.o2.call(this, a);
        this.z1 = a;
    };
    SplineAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineAreaSeries.prototype.cj = function () {
        if (this.ck == 0) {
            return 2;
        }
        return _super.prototype.cj.call(this);
    };
    SplineAreaSeries.prototype.nk = function (a, b) {
        _super.prototype.nk.call(this, a, b);
        var c = b;
        c.dg();
    };
    SplineAreaSeries.prototype.f5 = function (a, b) {
        var c = this.tj(this.to(a), true, false);
        if (this.y7(a, c, b)) {
            return true;
        }
        if (this.f4(a, b)) {
            return true;
        }
        if (this.uf(a, b)) {
            return true;
        }
        return false;
    };
    SplineAreaSeries.prototype.w7 = function (a, b) {
        var _this = this;
        _super.prototype.w7.call(this, a, b);
        var c = this.vx.cu.d;
        var d = typeCast(SplineAreaSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(b);
        this.vw.a2(this, this.wg(), runOn(this, this.vh), this.wp(b), this.wq(b));
        var g = false;
        var h = this.vw.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.by, b.bx, this.yx.ch, f);
            this.w3(e, -1, this.valueColumn.count, this.yx, i, b.q);
        }
        var j = d.ds;
        var k = d.dt;
        var l = d.du;
        var m = d.dv;
        this.vw.ad(j, true, false, true, true);
        this.vw.ad(k, true, false, true, true);
        this.vw.ad(l, false, true, false, false);
        this.vw.ad(m, false, true, false, false);
        l._opacity = this.vw.j * this.hg;
        m._opacity = 0.5 * this.vw.j * this.hg;
        if (b.cy(a)) {
            d.di(a.f.count, e, true, c, this.hk, function (n, o, p, q, r) { return _this.yd(n, a.f.count, b); }, 1, a.f.count == 1 ? null : this.xg(e, e.count - 1, b.bx, b.by, true));
            b.c1(a);
        }
        var n = this.fetchYAxis();
    };
    Object.defineProperty(SplineAreaSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.wk;
        },
        enumerable: false,
        configurable: true
    });
    SplineAreaSeries.$t = markType(SplineAreaSeries, 'SplineAreaSeries', SplineSeriesBase.$);
    return SplineAreaSeries;
}(SplineSeriesBase));
export { SplineAreaSeries };
/**
 * @hidden
 */
var SplineAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineAreaSeriesView, _super);
    function SplineAreaSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.df = null;
        _this.dn = new Path();
        _this.dq = new Path();
        _this.dp = new Path();
        _this.dr = new Path();
        _this.dj = new Path();
        _this.dl = new Path();
        _this.dk = new Path();
        _this.dm = new Path();
        _this.df = a;
        return _this;
    }
    SplineAreaSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.df.uc = Defaults.e;
        }
    };
    Object.defineProperty(SplineAreaSeriesView.prototype, "ds", {
        get: function () {
            return this.dq;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "dt", {
        get: function () {
            return this.dr;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "du", {
        get: function () {
            return this.dn;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "dv", {
        get: function () {
            return this.dp;
        },
        enumerable: false,
        configurable: true
    });
    SplineAreaSeriesView.prototype.dg = function () {
        this.dn.an = null;
        this.dp.an = null;
        this.dq.an = null;
        this.dr.an = null;
        this.as();
    };
    SplineAreaSeriesView.prototype.dh = function (a, b, c, d, e, f, g) {
        this.di(a, b, c, d, e, f, g, null);
    };
    SplineAreaSeriesView.prototype.di = function (a, b, c, d, e, f, g, h) {
        this.df.z0.a = typeCast(ISortingAxis_$type, this.cw.fetchXAxis()) !== null ? true : false;
        this.df.z0.j(this.dn, this.dq, this.dp, this.dr, a, b, c, d, e, f, g, h);
        this.as();
    };
    SplineAreaSeriesView.prototype.be = function () {
        _super.prototype.be.call(this);
        this.dj.an = this.dn.an;
        this.dl.an = this.dq.an;
        this.dk.an = this.dp.an;
        this.dm.an = this.dr.an;
        var a = this.br();
        this.dj._fill = a;
        this.dj._opacity = 1;
        this.dk._fill = a;
        this.dk._opacity = 1;
        this.dl._stroke = a;
        this.dl.ad = this.e.hl + 3;
        this.dm._stroke = a;
        this.dm.ad = this.e.hl + 3;
    };
    SplineAreaSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (b) {
            a.t(this.dj);
            a.t(this.dk);
            a.t(this.dl);
            a.t(this.dm);
        }
        else {
            a.t(this.dn);
            a.t(this.dp);
            a.t(this.dq);
            a.t(this.dr);
        }
    };
    SplineAreaSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.a5.exportPathData(a, this.dq, "lowerShape", ["Lower"]);
        this.e.a5.exportPathData(a, this.dr, "upperShape", ["Upper", "Main"]);
        this.e.a5.exportPathData(a, this.dp, "translucentShape", ["Translucent"]);
        this.e.a5.exportPathData(a, this.dn, "fillShape", ["Fill"]);
    };
    SplineAreaSeriesView.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 = 1;
        this.e.iu = -3;
    };
    SplineAreaSeriesView.$t = markType(SplineAreaSeriesView, 'SplineAreaSeriesView', SplineSeriesBaseView.$);
    return SplineAreaSeriesView;
}(SplineSeriesBaseView));
export { SplineAreaSeriesView };
