/*
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 * as tslib_1 from "tslib";
import { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries";
import { IUnknownValuePlotting_$type } from "igniteui-react-core/ES5/IUnknownValuePlotting";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-react-core/ES5/UnknownValuePlotting";
import { DependencyProperty } from "igniteui-react-core/ES5/DependencyProperty";
import { Type, typeCast, runOn, enumGetBox, markType } from "igniteui-react-core/ES5/type";
import { Path } from "igniteui-react-core/ES5/Path";
import { ScalerParams } from "./ScalerParams";
import { PropertyMetadata } from "igniteui-react-core/ES5/PropertyMetadata";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core/ES5/Color";
/**
 * @hidden
 */
var LineSeries = /** @class */ (function (_super) {
    tslib_1.__extends(LineSeries, _super);
    function LineSeries() {
        var _this = _super.call(this) || this;
        _this.qa = null;
        _this.qa = new CategoryLineRasterizer();
        _this.ab = LineSeries.$;
        _this.pu = 0;
        return _this;
    }
    LineSeries.prototype.bf = function () {
        return new LineSeriesView(this);
    };
    LineSeries.prototype.im = function (a) {
        _super.prototype.im.call(this, a);
        this.qb = a;
    };
    LineSeries.prototype.get_ck = function () {
        return true;
    };
    LineSeries.prototype.preferredCategoryMode = function (a) {
        return this.pu;
    };
    LineSeries.prototype.hp = function (a, b) {
        _super.prototype.hp.call(this, a, b);
        var c = b;
        c.c7();
    };
    LineSeries.prototype.oh = function (a, b) {
        _super.prototype.oh.call(this, a, b);
        var c = b.cn.d;
        var d = typeCast(LineSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(b);
        this.m7.x(this, this.ns(), this.pr, runOn(this, this.mt), this.n0(b), this.n1(b));
        var g = false;
        var h = this.m7.c;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.bs, b.br, this.pr.b8, f);
            this.od(e, -1, this.valueColumn.count, this.pr, i, b.n);
        }
        var j = d.dd;
        var k = d.de;
        var l = d.dc;
        this.m7.ae(j, true, false, true, false);
        this.m7.ae(k, true, false, true, false);
        this.m7.ae(l, false, true, false, false);
        l._opacity = 0.75 * this.m7.i;
        if (b.cr(a)) {
            d.c8(e.count, e, true, this.unknownValuePlotting, this.op(e, e.count - 1, b.br, b.bs), c, this.er);
            b.cu(a);
        }
    };
    LineSeries.prototype.is = function (a, b, c, d) {
        _super.prototype.is.call(this, a, b, c, d);
        switch (b) {
            case LineSeries.$$p[0]:
                this.m4.m = this.unknownValuePlotting == 0;
                this.i6(false);
                this.ic();
                break;
        }
    };
    Object.defineProperty(LineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.nv;
        },
        enumerable: true,
        configurable: true
    });
    LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    return LineSeries;
}(HorizontalAnchoredCategorySeries));
export { LineSeries };
Type.dep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::qd', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
/**
 * @hidden
 */
var LineSeriesView = /** @class */ (function (_super) {
    tslib_1.__extends(LineSeriesView, _super);
    function LineSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.c6 = null;
        _this.dg = new Path();
        _this.df = new Path();
        _this.dh = new Path();
        _this.db = new Path();
        _this.da = new Path();
        _this.c9 = new Path();
        _this.c6 = a;
        return _this;
    }
    Object.defineProperty(LineSeriesView.prototype, "dd", {
        get: function () {
            return this.dg;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "de", {
        get: function () {
            return this.dh;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "dc", {
        get: function () {
            return this.df;
        },
        enumerable: true,
        configurable: true
    });
    LineSeriesView.prototype.c7 = function () {
        this.df.aj = null;
        this.dg.aj = null;
        this.dh.aj = null;
        this.an();
    };
    LineSeriesView.prototype.c8 = function (a, b, c, d, e, f, g) {
        this.c6.qa.a = typeCast(ISortingAxis_$type, this.cp.fetchXAxis()) !== null ? true : false;
        this.c6.qa.m(this.dg, this.df, this.dh, a, b, c, d, e, f, g);
        this.an();
    };
    LineSeriesView.prototype.a8 = function () {
        _super.prototype.a8.call(this);
    };
    LineSeriesView.prototype.a9 = function () {
        _super.prototype.a9.call(this);
        this.da.aj = this.dg.aj;
        this.db.aj = this.dh.aj;
        this.c9.aj = this.df.aj;
        var a = this.bl();
        this.da._stroke = a;
        this.da.ac = this.e.ev + 3;
        this.db._stroke = a;
        this.db.ac = this.e.ev + 3;
        this.c9._fill = a;
        this.c9._opacity = 1;
    };
    LineSeriesView.prototype.a3 = function (a, b) {
        _super.prototype.a3.call(this, a, b);
        if (a.d) {
            if (b) {
                a.s(this.c9);
                a.s(this.da);
                a.s(this.db);
            }
            else {
                a.s(this.df);
                a.s(this.dg);
                a.s(this.dh);
            }
        }
    };
    LineSeriesView.prototype.ai = function (a) {
        _super.prototype.ai.call(this, a);
        this.e.a2.exportPathData(a, this.dg, "lowerShape", ["Lower", "Main"]);
        this.e.a2.exportPathData(a, this.dh, "upperShape", ["Upper"]);
        this.e.a2.exportPathData(a, this.df, "translucentShape", ["Translucent"]);
    };
    LineSeriesView.prototype.ac = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.k3 = a;
        this.e.es = 3;
        this.e.et = 1;
        this.e.eu = 4;
        this.e.dt = false;
    };
    LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
}(AnchoredCategorySeriesView));
export { LineSeriesView };
