/*
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 { Base, fromEnum, Point_$type, markType, getEnumerator } from "igniteui-react-core/ES2015/type";
import { TrendCalculators } from "igniteui-react-core/ES2015/TrendCalculators";
import { NotImplementedException } from "igniteui-react-core/ES2015/NotImplementedException";
export class TrendAverageCalculator extends Base {
    static a(a, b, c) {
        let d;
        switch (a) {
            case 9:
            case 10:
            case 11:
            case 13:
                if (c < 1) {
                    c = 1;
                }
                break;
        }
        switch (a) {
            case 9:
                d = TrendCalculators.e(b, c);
                break;
            case 10:
                d = TrendCalculators.b(b, c);
                break;
            case 11:
                d = TrendCalculators.c(b, c);
                break;
            case 12:
                d = TrendCalculators.a(b);
                break;
            case 13:
                d = TrendCalculators.g(b, c);
                break;
            default: throw new NotImplementedException(0);
        }
        return d;
    }
    static b(a, b, c, d) {
        if (b.count == 0) {
            let e = TrendAverageCalculator.a(a, c, d);
            for (let f of fromEnum(e)) {
                b.add(f);
            }
        }
    }
    static c(a, b, c, d, e) {
        if (b.count == 0) {
            let f = getEnumerator(TrendAverageCalculator.a(a, c, e));
            let g = getEnumerator(TrendAverageCalculator.a(a, d, e));
            while (f.moveNext() && g.moveNext()) {
                b.add({ $type: Point_$type, x: f.current, y: g.current });
            }
        }
    }
}
TrendAverageCalculator.$t = markType(TrendAverageCalculator, 'TrendAverageCalculator');
