/*
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-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { SplineSeriesBaseView } from "./SplineSeriesBaseView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
var SplineAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineAreaSeries, _super);
    function SplineAreaSeries() {
        var _this = _super.call(this) || this;
        _this.vq = null;
        _this.vq = new CategoryLineRasterizer();
        _this.ab = SplineAreaSeries.$;
        return _this;
    }
    SplineAreaSeries.prototype.get_dd = function () {
        return true;
    };
    SplineAreaSeries.prototype.get_eg = function () {
        return true;
    };
    SplineAreaSeries.prototype.bx = function () {
        return new SplineAreaSeriesView(this);
    };
    SplineAreaSeries.prototype.ry = function () {
        return 1;
    };
    SplineAreaSeries.prototype.ly = function (a) {
        _super.prototype.ly.call(this, a);
        this.vr = a;
    };
    SplineAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineAreaSeries.prototype.b3 = function () {
        if (this.b4 == 0) {
            return 2;
        }
        return _super.prototype.b3.call(this);
    };
    SplineAreaSeries.prototype.kx = function (a, b) {
        _super.prototype.kx.call(this, a, b);
        var c = b;
        c.dd();
    };
    SplineAreaSeries.prototype.ev = function (a, b) {
        var c = this.pl(this.po(a), true, false);
        if (this.ux(a, c, b)) {
            return true;
        }
        if (this.eu(a, b)) {
            return true;
        }
        if (this.qf(a, b)) {
            return true;
        }
        return false;
    };
    SplineAreaSeries.prototype.s6 = function (a, b) {
        var _this = this;
        _super.prototype.s6.call(this, a, b);
        var c = this.rx.cr.d;
        var d = typeCast(SplineAreaSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(b);
        this.rw.a0(this, this.sg(), runOn(this, this.rh), this.so(b), this.sp(b));
        var g = false;
        var h = this.rw.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.bv, b.bu, this.un.cg, f);
            this.s2(e, -1, this.valueColumn.count, this.un, i, b.q);
        }
        var j = d.dp;
        var k = d.dq;
        var l = d.dr;
        var m = d.ds;
        this.rw.ad(j, true, false, true, true);
        this.rw.ad(k, true, false, true, true);
        this.rw.ad(l, false, true, false, false);
        this.rw.ad(m, false, true, false, false);
        l._opacity = this.rw.j * this.fq;
        m._opacity = 0.5 * this.rw.j * this.fq;
        if (b.cv(a)) {
            d.df(a.f.count, e, true, c, this.ft, function (n, o, p, q, r) { return _this.t5(n, a.f.count, b); }, 1, a.f.count == 1 ? null : this.tf(e, e.count - 1, b.bu, b.bv, true));
            b.cy(a);
        }
        var n = this.fetchYAxis();
    };
    Object.defineProperty(SplineAreaSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.sj;
        },
        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.dc = null;
        _this.dk = new Path();
        _this.dm = new Path();
        _this.dl = new Path();
        _this.dn = new Path();
        _this.dg = new Path();
        _this.di = new Path();
        _this.dh = new Path();
        _this.dj = new Path();
        _this.dc = a;
        return _this;
    }
    SplineAreaSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.dc.qc = Defaults.e;
        }
    };
    Object.defineProperty(SplineAreaSeriesView.prototype, "dp", {
        get: function () {
            return this.dm;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "dq", {
        get: function () {
            return this.dn;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "dr", {
        get: function () {
            return this.dk;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "ds", {
        get: function () {
            return this.dl;
        },
        enumerable: false,
        configurable: true
    });
    SplineAreaSeriesView.prototype.dd = function () {
        this.dk.ak = null;
        this.dl.ak = null;
        this.dm.ak = null;
        this.dn.ak = null;
        this.aq();
    };
    SplineAreaSeriesView.prototype.de = function (a, b, c, d, e, f, g) {
        this.df(a, b, c, d, e, f, g, null);
    };
    SplineAreaSeriesView.prototype.df = function (a, b, c, d, e, f, g, h) {
        this.dc.vq.a = typeCast(ISortingAxis_$type, this.ct.fetchXAxis()) !== null ? true : false;
        this.dc.vq.j(this.dk, this.dm, this.dl, this.dn, a, b, c, d, e, f, g, h);
        this.aq();
    };
    SplineAreaSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        this.dg.ak = this.dk.ak;
        this.di.ak = this.dm.ak;
        this.dh.ak = this.dl.ak;
        this.dj.ak = this.dn.ak;
        var a = this.bo();
        this.dg._fill = a;
        this.dg._opacity = 1;
        this.dh._fill = a;
        this.dh._opacity = 1;
        this.di._stroke = a;
        this.di.ac = this.e.fu + 3;
        this.dj._stroke = a;
        this.dj.ac = this.e.fu + 3;
    };
    SplineAreaSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (b) {
            a.s(this.dg);
            a.s(this.dh);
            a.s(this.di);
            a.s(this.dj);
        }
        else {
            a.s(this.dk);
            a.s(this.dl);
            a.s(this.dm);
            a.s(this.dn);
        }
    };
    SplineAreaSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a8.exportPathData(a, this.dm, "lowerShape", ["Lower"]);
        this.e.a8.exportPathData(a, this.dn, "upperShape", ["Upper", "Main"]);
        this.e.a8.exportPathData(a, this.dl, "translucentShape", ["Translucent"]);
        this.e.a8.exportPathData(a, this.dk, "fillShape", ["Fill"]);
    };
    SplineAreaSeriesView.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 = 1;
        this.e.gy = -3;
    };
    SplineAreaSeriesView.$t = markType(SplineAreaSeriesView, 'SplineAreaSeriesView', SplineSeriesBaseView.$);
    return SplineAreaSeriesView;
}(SplineSeriesBaseView));
export { SplineAreaSeriesView };
