/*
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-react-core";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { typeCast, runOn, enumGetBox, markType, markDep } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { PropertyMetadata } from "igniteui-react-core";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
export let LineSeries = /*@__PURE__*/ (() => {
    class LineSeries extends HorizontalAnchoredCategorySeries {
        bi() {
            return new LineSeries();
        }
        get_fi() {
            return true;
        }
        cq() {
            return new LineSeriesView(this);
        }
        qw(a) {
            super.qw(a);
            this.acd = a;
        }
        ze() {
            return true;
        }
        get_et() {
            return true;
        }
        constructor() {
            super();
            this.acc = null;
            this.acc = new CategoryLineRasterizer();
            this.ab = LineSeries.$;
            this.abw = 0;
        }
        preferredCategoryMode(a) {
            return this.abw;
        }
        o2(a, b) {
            super.o2(a, b);
            let c = b;
            c.dg();
        }
        z3(a, b) {
            super.z3(a, b);
            let c = b.cw.d;
            let d = typeCast(LineSeriesView.$, b);
            let e = a.f;
            let f = this.getEffectiveViewport1(b);
            this.ys.a2(this, this.zc(), runOn(this, this.yd), this.zl(b), this.zm(b));
            let g = false;
            let h = this.ys.b;
            if (h != null) {
                g = true;
            }
            if (g) {
                let i = new ScalerParams(0, b.by, b.bx, this.abt.ch, f);
                this.zz(e, -1, this.valueColumn.count, this.abt, i, b.q, -1);
            }
            let j = d.dm;
            let k = d.dn;
            let l = d.dl;
            this.ys.ad(j, true, false, true, false);
            this.ys.ad(k, true, false, true, false);
            this.ys.ad(l, false, true, false, false);
            l._opacity = 0.75 * this.ys.j;
            if (b.c0(a)) {
                d.dh(e.count, e, true, this.unknownValuePlotting, this.aab(e, e.count - 1, b.bx, b.by), c, this.ib);
                b.c3(a);
            }
        }
        q4(a, b, c, d) {
            super.q4(a, b, c, d);
            switch (b) {
                case LineSeries.$$p[0]:
                    this.yp.m = this.unknownValuePlotting == 0;
                    this.rm(false);
                    this.qg();
                    break;
            }
        }
        get useHighMarkerFidelity() {
            return this.zg;
        }
    }
    LineSeries.$t = /*@__PURE__*/ markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::acf', [UnknownValuePlotting_$type, /*@__PURE__*/ enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return LineSeries;
})();
/**
 * @hidden
 */
export let LineSeriesView = /*@__PURE__*/ (() => {
    class LineSeriesView extends AnchoredCategorySeriesView {
        constructor(a) {
            super(a);
            this.df = null;
            this.dq = new Path();
            this.dp = new Path();
            this.dr = new Path();
            this.dk = new Path();
            this.dj = new Path();
            this.di = new Path();
            this.df = a;
        }
        au() {
            super.au();
            if (!this.q) {
                this.df.w1 = Defaults.e;
            }
        }
        get dm() {
            return this.dq;
        }
        get dn() {
            return this.dr;
        }
        get dl() {
            return this.dp;
        }
        dg() {
            this.dp.an = null;
            this.dq.an = null;
            this.dr.an = null;
            this.as();
        }
        dh(a, b, c, d, e, f, g) {
            this.df.acc.a = typeCast(ISortingAxis_$type, this.cy.fetchXAxis()) !== null ? true : false;
            this.df.acc.m(this.dq, this.dp, this.dr, a, b, c, d, e, f, g);
            this.as();
        }
        bd() {
            super.bd();
        }
        be() {
            super.be();
            this.dj.an = this.dq.an;
            this.dk.an = this.dr.an;
            this.di.an = this.dp.an;
            let a = this.br();
            this.dj._stroke = a;
            this.dj.ad = this.e.ic + 3;
            this.dk._stroke = a;
            this.dk.ad = this.e.ic + 3;
            this.di._fill = a;
            this.di._opacity = 1;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.di);
                    a.t(this.dj);
                    a.t(this.dk);
                }
                else {
                    a.t(this.dp);
                    a.t(this.dq);
                    a.t(this.dr);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.bb.exportPathData(a, this.dq, "lowerShape", ["Lower", "Main"]);
            this.e.bb.exportPathData(a, this.dr, "upperShape", ["Upper"]);
            this.e.bb.exportPathData(a, this.dp, "translucentShape", ["Translucent"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.vu = a;
            this.e.jk = 3;
            this.e.jl = 1;
            this.e.jm = 4;
            this.e.ha = false;
        }
    }
    LineSeriesView.$t = /*@__PURE__*/ markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
})();
