/*
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, Number_$type, String_$type, fromEnum, markType } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Tuple$2 } from "igniteui-angular-core";
import { Tuple } from "igniteui-angular-core";
import { ArgumentException } from "igniteui-angular-core";
import { StringBuilder } from "igniteui-angular-core";
import { stringEmpty } from "igniteui-angular-core";
/**
 * @hidden
 */
export class UltraCalcFunctionRoman_RomanNumeral extends Base {
    constructor(a) {
        super();
        this.k = 0;
        if (a < 0 || a > 3999) {
            throw new ArgumentException(2, "Number must be between 1 and 3999", "number");
        }
        this.k = a;
    }
    get l() {
        return this.k;
    }
    static get b() {
        if (UltraCalcFunctionRoman_RomanNumeral.a == null) {
            UltraCalcFunctionRoman_RomanNumeral.a = new List$1(Tuple$2.$.specialize(Number_$type, String_$type), 2, 13);
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 1000, "M"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 900, "CM"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 500, "D"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 400, "CD"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 100, "C"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 90, "XC"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 50, "L"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 40, "XL"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 10, "X"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 9, "IX"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 5, "V"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 4, "IV"));
            UltraCalcFunctionRoman_RomanNumeral.a.add(Tuple.a(Number_$type, String_$type, 1, "I"));
        }
        return UltraCalcFunctionRoman_RomanNumeral.a;
    }
    static get d() {
        if (UltraCalcFunctionRoman_RomanNumeral.c == null) {
            UltraCalcFunctionRoman_RomanNumeral.c = new List$1(Tuple$2.$.specialize(Number_$type, String_$type), 2, 17);
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 1000, "M"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 950, "LM"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 900, "CM"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 500, "D"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 450, "LD"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 400, "CD"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 100, "C"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 95, "VC"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 90, "XC"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 50, "L"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 45, "VL"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 40, "XL"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 10, "X"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 9, "IX"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 5, "V"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 4, "IV"));
            UltraCalcFunctionRoman_RomanNumeral.c.add(Tuple.a(Number_$type, String_$type, 1, "I"));
        }
        return UltraCalcFunctionRoman_RomanNumeral.c;
    }
    static get f() {
        if (UltraCalcFunctionRoman_RomanNumeral.e == null) {
            UltraCalcFunctionRoman_RomanNumeral.e = new List$1(Tuple$2.$.specialize(Number_$type, String_$type), 2, 21);
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 1000, "M"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 990, "XM"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 950, "LM"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 900, "CM"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 500, "D"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 490, "XD"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 450, "LD"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 400, "CD"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 100, "C"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 99, "IC"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 95, "VC"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 90, "XC"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 50, "L"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 49, "IL"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 45, "VL"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 40, "XL"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 10, "X"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 9, "IX"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 5, "V"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 4, "IV"));
            UltraCalcFunctionRoman_RomanNumeral.e.add(Tuple.a(Number_$type, String_$type, 1, "I"));
        }
        return UltraCalcFunctionRoman_RomanNumeral.e;
    }
    static get h() {
        if (UltraCalcFunctionRoman_RomanNumeral.g == null) {
            UltraCalcFunctionRoman_RomanNumeral.g = new List$1(Tuple$2.$.specialize(Number_$type, String_$type), 2, 23);
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 1000, "M"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 995, "VM"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 990, "XM"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 950, "LM"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 900, "CM"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 500, "D"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 495, "VD"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 490, "XD"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 450, "LD"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 400, "CD"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 100, "C"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 99, "IC"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 95, "VC"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 90, "XC"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 50, "L"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 49, "IL"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 45, "VL"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 40, "XL"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 10, "X"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 9, "IX"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 5, "V"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 4, "IV"));
            UltraCalcFunctionRoman_RomanNumeral.g.add(Tuple.a(Number_$type, String_$type, 1, "I"));
        }
        return UltraCalcFunctionRoman_RomanNumeral.g;
    }
    static get j() {
        if (UltraCalcFunctionRoman_RomanNumeral.i == null) {
            UltraCalcFunctionRoman_RomanNumeral.i = new List$1(Tuple$2.$.specialize(Number_$type, String_$type), 2, 25);
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 1000, "M"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 999, "IM"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 995, "VM"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 990, "XM"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 950, "LM"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 900, "CM"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 500, "D"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 499, "ID"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 495, "VD"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 490, "XD"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 450, "LD"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 400, "CD"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 100, "C"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 99, "IC"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 95, "VC"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 90, "XC"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 50, "L"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 49, "IL"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 45, "VL"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 40, "XL"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 10, "X"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 9, "IX"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 5, "V"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 4, "IV"));
            UltraCalcFunctionRoman_RomanNumeral.i.add(Tuple.a(Number_$type, String_$type, 1, "I"));
        }
        return UltraCalcFunctionRoman_RomanNumeral.i;
    }
    toString() {
        return this.p(0);
    }
    o(a) {
        if (a) {
            return this.p(0);
        }
        else {
            return this.p(4);
        }
    }
    p(a) {
        if (this.k == 0) {
            return stringEmpty();
        }
        return UltraCalcFunctionRoman_RomanNumeral.m(this.k, a);
    }
    static m(a, b) {
        let c;
        switch (b) {
            case 0:
                c = UltraCalcFunctionRoman_RomanNumeral.b;
                break;
            case 1:
                c = UltraCalcFunctionRoman_RomanNumeral.d;
                break;
            case 2:
                c = UltraCalcFunctionRoman_RomanNumeral.f;
                break;
            case 3:
                c = UltraCalcFunctionRoman_RomanNumeral.h;
                break;
            case 4:
                c = UltraCalcFunctionRoman_RomanNumeral.j;
                break;
            default: throw new ArgumentException(1, "form");
        }
        let d = new StringBuilder(0);
        let e = stringEmpty();
        for (let f of fromEnum(c)) {
            while (a >= f.c) {
                a -= f.c;
                d.l(f.d);
            }
        }
        return d.toString();
    }
}
UltraCalcFunctionRoman_RomanNumeral.$t = markType(UltraCalcFunctionRoman_RomanNumeral, 'UltraCalcFunctionRoman_RomanNumeral');
UltraCalcFunctionRoman_RomanNumeral.a = null;
UltraCalcFunctionRoman_RomanNumeral.c = null;
UltraCalcFunctionRoman_RomanNumeral.e = null;
UltraCalcFunctionRoman_RomanNumeral.g = null;
UltraCalcFunctionRoman_RomanNumeral.i = null;
//# sourceMappingURL=UltraCalcFunctionRoman_RomanNumeral.js.map