/*
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.zy = null;
        _this.zy = new CategoryLineRasterizer();
        _this.ab = SplineAreaSeries.$;
        return _this;
    }
    SplineAreaSeries.prototype.get_d8 = function () {
        return true;
    };
    SplineAreaSeries.prototype.get_fd = function () {
        return true;
    };
    SplineAreaSeries.prototype.cg = function () {
        return new SplineAreaSeriesView(this);
    };
    SplineAreaSeries.prototype.vw = function () {
        return 1;
    };
    SplineAreaSeries.prototype.o0 = function (a) {
        _super.prototype.o0.call(this, a);
        this.zz = a;
    };
    SplineAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineAreaSeries.prototype.cm = function () {
        if (this.cn == 0) {
            return 2;
        }
        return _super.prototype.cm.call(this);
    };
    SplineAreaSeries.prototype.nj = function (a, b) {
        _super.prototype.nj.call(this, a, b);
        var c = b;
        c.dg();
    };
    SplineAreaSeries.prototype.f4 = function (a, b) {
        var c = this.th(this.tm(a), true, false);
        if (this.y5(a, c, b)) {
            return true;
        }
        if (this.f3(a, b)) {
            return true;
        }
        if (this.ud(a, b)) {
            return true;
        }
        return false;
    };
    SplineAreaSeries.prototype.w5 = function (a, b) {
        var _this = this;
        _super.prototype.w5.call(this, a, b);
        var c = this.vv.cu.d;
        var d = typeCast(SplineAreaSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(b);
        this.vu.a2(this, this.we(), runOn(this, this.vf), this.wn(b), this.wo(b));
        var g = false;
        var h = this.vu.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.by, b.bx, this.yv.ch, f);
            this.w1(e, -1, this.valueColumn.count, this.yv, i, b.q);
        }
        var j = d.ds;
        var k = d.dt;
        var l = d.du;
        var m = d.dv;
        this.vu.ad(j, true, false, true, true);
        this.vu.ad(k, true, false, true, true);
        this.vu.ad(l, false, true, false, false);
        this.vu.ad(m, false, true, false, false);
        l._opacity = this.vu.j * this.hf;
        m._opacity = 0.5 * this.vu.j * this.hf;
        if (b.cy(a)) {
            d.di(a.f.count, e, true, c, this.hj, function (n, o, p, q, r) { return _this.yb(n, a.f.count, b); }, 1, a.f.count == 1 ? null : this.xe(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.wi;
        },
        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.ua = 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.zy.a = typeCast(ISortingAxis_$type, this.cw.fetchXAxis()) !== null ? true : false;
        this.df.zy.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.hk + 3;
        this.dm._stroke = a;
        this.dm.ad = this.e.hk + 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.a9.exportPathData(a, this.dq, "lowerShape", ["Lower"]);
        this.e.a9.exportPathData(a, this.dr, "upperShape", ["Upper", "Main"]);
        this.e.a9.exportPathData(a, this.dp, "translucentShape", ["Translucent"]);
        this.e.a9.exportPathData(a, this.dn, "fillShape", ["Fill"]);
    };
    SplineAreaSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.s6 = a;
        this.e.ir = 5;
        this.e.is = 1;
        this.e.it = -3;
    };
    SplineAreaSeriesView.$t = markType(SplineAreaSeriesView, 'SplineAreaSeriesView', SplineSeriesBaseView.$);
    return SplineAreaSeriesView;
}(SplineSeriesBaseView));
export { SplineAreaSeriesView };
