/*
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 { 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 { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
export class SplineAreaSeries extends SplineSeriesBase {
    constructor() {
        super();
        this.qr = null;
        this.qr = new CategoryLineRasterizer();
        this.ab = SplineAreaSeries.$;
    }
    bf() {
        return new SplineAreaSeriesView(this);
    }
    ng() {
        return 1;
    }
    iu(a) {
        super.iu(a);
        this.qs = a;
    }
    preferredCategoryMode(a) {
        return 0;
    }
    hv(a, b) {
        super.hv(a, b);
        let c = b;
        c.c8();
    }
    dh(a, b) {
        let c = this.ll(this.lo(a), true, false);
        if (this.p8(a, c, b)) {
            return true;
        }
        if (this.dg(a, b)) {
            return true;
        }
        if (this.l4(a, b)) {
            return true;
        }
        return false;
    }
    oo(a, b) {
        super.oo(a, b);
        let c = this.nf.cn.d;
        let d = typeCast(SplineAreaSeriesView.$, b);
        let e = a.f;
        let f = this.getEffectiveViewport1(b);
        this.ne.x(this, this.nz(), this.py, runOn(this, this.m0), this.n7(b), this.n8(b));
        let g = false;
        let h = this.ne.c;
        if (h != null) {
            g = true;
        }
        if (g) {
            let i = new ScalerParams(0, b.bs, b.br, this.py.b8, f);
            this.ok(e, -1, this.valueColumn.count, this.py, i, b.n);
        }
        let j = d.df;
        let k = d.dg;
        let l = d.di;
        let m = d.dk;
        this.ne.ae(j, true, false, true, true);
        this.ne.ae(k, true, false, true, true);
        this.ne.ae(l, false, true, false, false);
        this.ne.ae(m, false, true, false, false);
        l._opacity = this.ne.i * this.d6;
        m._opacity = 0.5 * this.ne.i * this.d6;
        if (b.cr(a)) {
            d.da(a.f.count, e, true, c, this.eu, (n, o, p, q, r) => this.pi(n, a.f.count, b), 1, a.f.count == 1 ? null : this.ox(e, e.count - 1, b.br, b.bs, true));
            b.cu(a);
        }
        let n = this.fetchYAxis();
    }
    get useHighMarkerFidelity() {
        return this.n2;
    }
}
SplineAreaSeries.$t = markType(SplineAreaSeries, 'SplineAreaSeries', SplineSeriesBase.$);
/**
 * @hidden
 */
export class SplineAreaSeriesView extends SplineSeriesBaseView {
    constructor(a) {
        super(a);
        this.c7 = null;
        this.dh = new Path();
        this.dl = new Path();
        this.dj = new Path();
        this.dm = new Path();
        this.db = new Path();
        this.dd = new Path();
        this.dc = new Path();
        this.de = new Path();
        this.c7 = a;
    }
    ap() {
        super.ap();
        if (!this.n) {
            this.e.bj = 1;
        }
    }
    get df() {
        return this.dl;
    }
    get dg() {
        return this.dm;
    }
    get di() {
        return this.dh;
    }
    get dk() {
        return this.dj;
    }
    c8() {
        this.dh.ak = null;
        this.dj.ak = null;
        this.dl.ak = null;
        this.dm.ak = null;
        this.an();
    }
    c9(a, b, c, d, e, f, g) {
        this.da(a, b, c, d, e, f, g, null);
    }
    da(a, b, c, d, e, f, g, h) {
        this.c7.qr.a = typeCast(ISortingAxis_$type, this.cp.fetchXAxis()) !== null ? true : false;
        this.c7.qr.j(this.dh, this.dl, this.dj, this.dm, a, b, c, d, e, f, g, h);
        this.an();
    }
    a9() {
        super.a9();
        this.db.ak = this.dh.ak;
        this.dd.ak = this.dl.ak;
        this.dc.ak = this.dj.ak;
        this.de.ak = this.dm.ak;
        let a = this.bl();
        this.db._fill = a;
        this.db._opacity = 1;
        this.dc._fill = a;
        this.dc._opacity = 1;
        this.dd._stroke = a;
        this.dd.ac = this.e.ey + 3;
        this.de._stroke = a;
        this.de.ac = this.e.ey + 3;
    }
    a3(a, b) {
        super.a3(a, b);
        if (b) {
            a.s(this.db);
            a.s(this.dc);
            a.s(this.dd);
            a.s(this.de);
        }
        else {
            a.s(this.dh);
            a.s(this.dj);
            a.s(this.dl);
            a.s(this.dm);
        }
    }
    ai(a) {
        super.ai(a);
        this.e.a2.exportPathData(a, this.dl, "lowerShape", ["Lower"]);
        this.e.a2.exportPathData(a, this.dm, "upperShape", ["Upper", "Main"]);
        this.e.a2.exportPathData(a, this.dj, "translucentShape", ["Translucent"]);
        this.e.a2.exportPathData(a, this.dh, "fillShape", ["Fill"]);
    }
    ac() {
        let a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.la = a;
        this.e.ev = 5;
        this.e.ew = 1;
        this.e.ex = -3;
    }
}
SplineAreaSeriesView.$t = markType(SplineAreaSeriesView, 'SplineAreaSeriesView', SplineSeriesBaseView.$);
//# sourceMappingURL=SplineAreaSeries_combined.js.map