/*
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 { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries";
import { IUnknownValuePlotting_$type } from "igniteui-angular-core";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { typeCast, runOn, enumGetBox, markType, markDep } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { PropertyMetadata } from "igniteui-angular-core";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
export class AreaSeries extends HorizontalAnchoredCategorySeries {
    constructor() {
        super();
        this.qi = null;
        this.qi = new CategoryLineRasterizer();
        this.ab = AreaSeries.$;
        this.p1 = 0;
    }
    bf() {
        return new AreaSeriesView(this);
    }
    ng() {
        return 1;
    }
    iu(a) {
        super.iu(a);
        this.qh = a;
    }
    get_ck() {
        return true;
    }
    preferredCategoryMode(a) {
        return this.p1;
    }
    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;
    }
    hv(a, b) {
        super.hv(a, b);
        let c = b;
        c.c7();
    }
    oo(a, b) {
        super.oo(a, b);
        let c = b.cn.d;
        let d = typeCast(AreaSeriesView.$, b);
        let e = a.f;
        let f = this.getEffectiveViewport1(d);
        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.de;
        let k = d.df;
        let l = d.dh;
        let m = d.dj;
        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);
        if (b.cr(a)) {
            d.c9(e.count, e, true, c, this.eu, (n, o, p, q, r) => this.pi(n, a.f.count, b), this.unknownValuePlotting, e.count == 1 ? null : this.ox(e, e.count - 1, b.br, b.bs, true));
            b.cu(a);
        }
        let n = this.fetchYAxis();
        l._opacity = this.ne.i * this.d6;
        m._opacity = 0.5 * this.ne.i * this.d6;
    }
    iz(a, b, c, d) {
        super.iz(a, b, c, d);
        switch (b) {
            case AreaSeries.$$p[0]:
                this.nb.m = this.unknownValuePlotting == 0;
                this.jd(false);
                this.ik();
                break;
        }
    }
    get useHighMarkerFidelity() {
        return this.n2;
    }
}
AreaSeries.$t = markType(AreaSeries, 'AreaSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
AreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, AreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting::qk', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
/**
 * @hidden
 */
export class AreaSeriesView extends AnchoredCategorySeriesView {
    constructor(a) {
        super(a);
        this.c6 = null;
        this.dg = new Path();
        this.dk = new Path();
        this.di = new Path();
        this.dl = new Path();
        this.da = new Path();
        this.dc = new Path();
        this.db = new Path();
        this.dd = new Path();
        this.c6 = a;
    }
    ap() {
        super.ap();
        if (!this.n) {
            this.e.bj = 1;
        }
    }
    get de() {
        return this.dk;
    }
    get df() {
        return this.dl;
    }
    get dh() {
        return this.dg;
    }
    get dj() {
        return this.di;
    }
    c7() {
        this.dg.ak = null;
        this.di.ak = null;
        this.dk.ak = null;
        this.dl.ak = null;
        this.an();
    }
    c8(a, b, c, d, e, f, g) {
        this.c9(a, b, c, d, e, f, g, null);
    }
    c9(a, b, c, d, e, f, g, h) {
        this.c6.qi.a = typeCast(ISortingAxis_$type, this.cp.fetchXAxis()) !== null ? true : false;
        this.c6.qi.j(this.dg, this.dk, this.di, this.dl, a, b, c, d, e, f, g, h);
        this.an();
    }
    a9() {
        super.a9();
        this.da.ak = this.dg.ak;
        this.dc.ak = this.dk.ak;
        this.db.ak = this.di.ak;
        this.dd.ak = this.dl.ak;
        let a = this.bl();
        this.da._fill = a;
        this.da._opacity = 1;
        this.db._fill = a;
        this.db._opacity = 1;
        this.dc._stroke = a;
        this.dc.ac = this.e.ey + 3;
        this.dd._stroke = a;
        this.dd.ac = this.e.ey + 3;
    }
    a3(a, b) {
        super.a3(a, b);
        if (b) {
            a.s(this.da);
            a.s(this.db);
            a.s(this.dc);
            a.s(this.dd);
        }
        else {
            a.s(this.dg);
            a.s(this.di);
            a.s(this.dk);
            a.s(this.dl);
        }
    }
    ai(a) {
        super.ai(a);
        this.e.a2.exportPathData(a, this.dk, "lowerShape", ["Lower"]);
        this.e.a2.exportPathData(a, this.dl, "upperShape", ["Upper", "Main"]);
        this.e.a2.exportPathData(a, this.di, "translucentShape", ["Translucent"]);
        this.e.a2.exportPathData(a, this.dg, "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;
    }
}
AreaSeriesView.$t = markType(AreaSeriesView, 'AreaSeriesView', AnchoredCategorySeriesView.$);
//# sourceMappingURL=AreaSeries_combined.js.map