/*
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-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 { List$1 } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { ChartSelection } from "./ChartSelection";
import { PropertyMetadata } from "igniteui-angular-core";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
var LineSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(LineSeries, _super);
    function LineSeries() {
        var _this = _super.call(this) || this;
        _this.ac8 = null;
        _this.ac8 = new CategoryLineRasterizer();
        _this.ab = LineSeries.$;
        _this.acs = 0;
        return _this;
    }
    LineSeries.prototype.bk = function () {
        return new LineSeries();
    };
    LineSeries.prototype.get_fl = function () {
        return true;
    };
    LineSeries.prototype.ct = function () {
        return new LineSeriesView(this);
    };
    LineSeries.prototype.q7 = function (a) {
        _super.prototype.q7.call(this, a);
        this.ac9 = a;
    };
    LineSeries.prototype.zy = function () {
        return true;
    };
    LineSeries.prototype.get_ex = function () {
        return true;
    };
    LineSeries.prototype.preferredCategoryMode = function (a) {
        return this.acs;
    };
    LineSeries.prototype.pb = function (a, b) {
        _super.prototype.pb.call(this, a, b);
        var c = b;
        c.du();
    };
    LineSeries.prototype.aax = function (a, b) {
        _super.prototype.aax.call(this, a, b);
        var c = b.c9.d;
        var d = typeCast(LineSeriesView.$, b);
        var e = a.h;
        var f = this.getEffectiveViewport1(b);
        this.zc.a2(this, this.zw(), runOn(this, this.yw), this.z5(b), this.z6(b));
        var g = false;
        var h = this.zc.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.ca, b.b9, this.acp.df, f);
            this.aat(e, -1, this.valueColumn.count, this.acp, i, b.t, -1);
        }
        var j = d.d0;
        var k = d.d1;
        var l = d.dz;
        this.zc.ad(j, true, false, true, false);
        this.zc.ad(k, true, false, true, false);
        this.zc.ad(l, false, true, false, false);
        l._opacity = 0.75 * this.zc.j;
        if (b.dd(a)) {
            d.dv(e.count, e, true, this.unknownValuePlotting, this.aa5(e, e.count - 1, b.b9, b.ca), c, this.ie);
            b.dg(a);
        }
    };
    LineSeries.prototype.ak = function (a, b) {
        var c = new List$1(ChartSelection.$, 0);
        this.qa(a, c, b);
        return c.toArray();
    };
    LineSeries.prototype.qa = function (a, b, c) {
        this.aap(a, b, c, this.y3, 0);
    };
    LineSeries.prototype.aam = function (a, b, c, d, e) {
        var f = this.aan(a, b, c, d, e);
        d = f.p3;
        e = f.p4;
        return {
            p3: d,
            p4: e
        };
    };
    LineSeries.prototype.rg = function (a, b, c, d) {
        _super.prototype.rg.call(this, a, b, c, d);
        switch (b) {
            case LineSeries.$$p[0]:
                this.y9.m = this.unknownValuePlotting == 0;
                this.ry(false);
                this.qr();
                break;
        }
    };
    Object.defineProperty(LineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.z0;
        },
        enumerable: false,
        configurable: true
    });
    LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::adb', [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.dt = null;
        _this.d3 = new Path();
        _this.d2 = new Path();
        _this.d4 = new Path();
        _this.dy = new Path();
        _this.dx = new Path();
        _this.dw = new Path();
        _this.dt = a;
        return _this;
    }
    LineSeriesView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
            this.dt.xk = Defaults.e;
        }
    };
    Object.defineProperty(LineSeriesView.prototype, "d0", {
        get: function () {
            return this.d3;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "d1", {
        get: function () {
            return this.d4;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "dz", {
        get: function () {
            return this.d2;
        },
        enumerable: false,
        configurable: true
    });
    LineSeriesView.prototype.du = function () {
        this.d2.an = null;
        this.d3.an = null;
        this.d4.an = null;
        this.a2();
    };
    LineSeriesView.prototype.dv = function (a, b, c, d, e, f, g) {
        this.dt.ac8.a = typeCast(ISortingAxis_$type, this.db.fetchXAxis()) !== null ? true : false;
        this.dt.ac8.m(this.d3, this.d2, this.d4, a, b, c, d, e, f, g);
        this.a2();
    };
    LineSeriesView.prototype.bp = function () {
        _super.prototype.bp.call(this);
    };
    LineSeriesView.prototype.bq = function () {
        _super.prototype.bq.call(this);
        this.dx.an = this.d3.an;
        this.dy.an = this.d4.an;
        this.dw.an = this.d2.an;
        var a = this.b3();
        this.dx._stroke = a;
        this.dx.ad = this.f.ig + 3;
        this.dy._stroke = a;
        this.dy.ad = this.f.ig + 3;
        this.dw._fill = a;
        this.dw._opacity = 1;
    };
    LineSeriesView.prototype.bj = function (a, b) {
        _super.prototype.bj.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dw);
                a.t(this.dx);
                a.t(this.dy);
            }
            else {
                a.t(this.d2);
                a.t(this.d3);
                a.t(this.d4);
            }
        }
    };
    LineSeriesView.prototype.ax = function (a) {
        _super.prototype.ax.call(this, a);
        this.f.bc.exportPathData(a, this.d3, "lowerShape", ["Lower", "Main"]);
        this.f.bc.exportPathData(a, this.d4, "upperShape", ["Upper"]);
        this.f.bc.exportPathData(a, this.d2, "translucentShape", ["Translucent"]);
    };
    LineSeriesView.prototype.an = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.f.wb = a;
        this.f.jq = 3;
        this.f.jr = 1;
        this.f.js = 4;
        this.f.hd = false;
    };
    LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
}(AnchoredCategorySeriesView));
export { LineSeriesView };
