/*
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 { 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
 */
var LineSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(LineSeries, _super);
    function LineSeries() {
        var _this = _super.call(this) || this;
        _this.ze = null;
        _this.ze = new CategoryLineRasterizer();
        _this.ab = LineSeries.$;
        _this.yy = 0;
        return _this;
    }
    LineSeries.prototype.get_ex = function () {
        return true;
    };
    LineSeries.prototype.cg = function () {
        return new LineSeriesView(this);
    };
    LineSeries.prototype.o0 = function (a) {
        _super.prototype.o0.call(this, a);
        this.zf = a;
    };
    LineSeries.prototype.wg = function () {
        return true;
    };
    LineSeries.prototype.get_d9 = function () {
        return true;
    };
    LineSeries.prototype.preferredCategoryMode = function (a) {
        return this.yy;
    };
    LineSeries.prototype.nj = function (a, b) {
        _super.prototype.nj.call(this, a, b);
        var c = b;
        c.de();
    };
    LineSeries.prototype.w5 = function (a, b) {
        _super.prototype.w5.call(this, a, b);
        var c = b.cu.d;
        var d = typeCast(LineSeriesView.$, 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.dk;
        var k = d.dl;
        var l = d.dj;
        this.vu.ad(j, true, false, true, false);
        this.vu.ad(k, true, false, true, false);
        this.vu.ad(l, false, true, false, false);
        l._opacity = 0.75 * this.vu.j;
        if (b.cy(a)) {
            d.df(e.count, e, true, this.unknownValuePlotting, this.xd(e, e.count - 1, b.bx, b.by), c, this.hj);
            b.c1(a);
        }
    };
    LineSeries.prototype.o8 = function (a, b, c, d) {
        _super.prototype.o8.call(this, a, b, c, d);
        switch (b) {
            case LineSeries.$$p[0]:
                this.vr.m = this.unknownValuePlotting == 0;
                this.pp(false);
                this.ol();
                break;
        }
    };
    Object.defineProperty(LineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.wi;
        },
        enumerable: false,
        configurable: true
    });
    LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::zh', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return LineSeries;
}(HorizontalAnchoredCategorySeries));
export { LineSeries };
/**
 * @hidden
 */
var LineSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(LineSeriesView, _super);
    function LineSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.dd = null;
        _this.dn = new Path();
        _this.dm = new Path();
        _this.dp = new Path();
        _this.di = new Path();
        _this.dh = new Path();
        _this.dg = new Path();
        _this.dd = a;
        return _this;
    }
    LineSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.dd.ua = Defaults.e;
        }
    };
    Object.defineProperty(LineSeriesView.prototype, "dk", {
        get: function () {
            return this.dn;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "dl", {
        get: function () {
            return this.dp;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "dj", {
        get: function () {
            return this.dm;
        },
        enumerable: false,
        configurable: true
    });
    LineSeriesView.prototype.de = function () {
        this.dm.an = null;
        this.dn.an = null;
        this.dp.an = null;
        this.as();
    };
    LineSeriesView.prototype.df = function (a, b, c, d, e, f, g) {
        this.dd.ze.a = typeCast(ISortingAxis_$type, this.cw.fetchXAxis()) !== null ? true : false;
        this.dd.ze.m(this.dn, this.dm, this.dp, a, b, c, d, e, f, g);
        this.as();
    };
    LineSeriesView.prototype.bd = function () {
        _super.prototype.bd.call(this);
    };
    LineSeriesView.prototype.be = function () {
        _super.prototype.be.call(this);
        this.dh.an = this.dn.an;
        this.di.an = this.dp.an;
        this.dg.an = this.dm.an;
        var a = this.br();
        this.dh._stroke = a;
        this.dh.ad = this.e.hk + 3;
        this.di._stroke = a;
        this.di.ad = this.e.hk + 3;
        this.dg._fill = a;
        this.dg._opacity = 1;
    };
    LineSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dg);
                a.t(this.dh);
                a.t(this.di);
            }
            else {
                a.t(this.dm);
                a.t(this.dn);
                a.t(this.dp);
            }
        }
    };
    LineSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.a9.exportPathData(a, this.dn, "lowerShape", ["Lower", "Main"]);
        this.e.a9.exportPathData(a, this.dp, "upperShape", ["Upper"]);
        this.e.a9.exportPathData(a, this.dm, "translucentShape", ["Translucent"]);
    };
    LineSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.s6 = a;
        this.e.ir = 3;
        this.e.is = 1;
        this.e.it = 4;
        this.e.gj = false;
    };
    LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
}(AnchoredCategorySeriesView));
export { LineSeriesView };
