/*
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 { ISortingAxis_$type } from "./ISortingAxis";
import { ScalerParams } from "./ScalerParams";
import { Base, typeCast, markType, TypeRegistrar, NotSupportedException } from "igniteui-react-core/ES5/type";
var CategoryTrendLineManagerFactory = /** @class */ (function (_super) {
    tslib_1.__extends(CategoryTrendLineManagerFactory, _super);
    function CategoryTrendLineManagerFactory() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    CategoryTrendLineManagerFactory.a = function (a, b, c, d, e) {
        if (b != null && typeCast(ISortingAxis_$type, b) !== null) {
            if (a != null) {
                a.g$f();
            }
            if (!TypeRegistrar.isRegistered("SortingTrendLineManager")) {
                throw new NotSupportedException(0, e.p);
            }
            var f = TypeRegistrar.create("SortingTrendLineManager", (function (g) {
                var h = g;
                var i = typeCast(ISortingAxis_$type, b);
                if (i != null) {
                    g = Math.min(g, i.i$b.count - 1);
                    h = i.i$b._inner[g];
                }
                return i.i$d(h);
            }), (function (g, h, i) {
                var j = d.getEffectiveViewport1(d.bi);
                var k = new ScalerParams(0, i, h, b.b8, j);
                return b.dw(g, k);
            }));
            f.g$c(c, d);
            return f;
        }
        else if (a == null || a.g$a != 0) {
            if (a != null) {
                a.g$f();
            }
            if (!TypeRegistrar.isRegistered("CategoryTrendLineManager")) {
                throw new NotSupportedException(0, e.p);
            }
            var g = TypeRegistrar.create("CategoryTrendLineManager");
            g.g$c(c, d);
            return g;
        }
        return a;
    };
    CategoryTrendLineManagerFactory.$t = markType(CategoryTrendLineManagerFactory, 'CategoryTrendLineManagerFactory');
    return CategoryTrendLineManagerFactory;
}(Base));
export { CategoryTrendLineManagerFactory };
