/*
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, toNullable, markType } from "igniteui-angular-core";
import { FormatConditionTextOperator_$type } from "./FormatConditionTextOperator";
import { FormatConditionOperator_$type } from "./FormatConditionOperator";
import { IconSetConditionalFormat } from "./IconSetConditionalFormat";
import { ExcelUtils } from "./ExcelUtils";
/**
 * @hidden
 */
export class EnumConverter extends Base {
    static e(a) {
        let b = 0;
        switch (a) {
            case 17:
                b = 11;
                break;
            case 10:
            case 11:
            case 8:
            case 9:
                b = 8;
                break;
            case 1:
                b = 0;
                break;
            case 2:
                b = 2;
                break;
            case 12:
                b = 9;
                break;
            case 13:
                b = 12;
                break;
            case 14:
                b = 13;
                break;
            case 15:
                b = 14;
                break;
            case 3:
                b = 3;
                break;
            case 7:
                b = 7;
                break;
            case 6:
                b = 6;
                break;
            case 0:
                b = 1;
                break;
            case 4:
                b = 5;
                break;
            case 16:
                b = 10;
                break;
            case 5:
                b = 4;
                break;
            default: break;
        }
        return b;
    }
    static g(a, b) {
        if (b.hasValue) {
            return b.value == 0 ? 10 : b.value == 3 ? 9 : b.value == 1 ? 11 : 8;
        }
        switch (a) {
            case 11: return 17;
            case 9: return 12;
            case 0: return 1;
            case 2: return 2;
            case 3: return 3;
            case 7: return 7;
            case 13: return 14;
            case 1: return 0;
            case 5: return 4;
            case 12: return 13;
            case 14: return 15;
            case 4: return 5;
            case 10: return 16;
            case 6: return 6;
            default: return 1;
        }
    }
    static d(a) {
        let b = 0;
        if (a.hasValue == false) {
            return b;
        }
        switch (a.value) {
            case 3:
                b = 6;
                break;
            case 5:
                b = 9;
                break;
            case 8:
                b = 5;
                break;
            case 6:
                b = 8;
                break;
            case 9:
                b = 4;
                break;
            case 4:
                b = 7;
                break;
            case 7:
                b = 3;
                break;
            case 0:
                b = 0;
                break;
            case 2:
                b = 1;
                break;
            case 1:
                b = 2;
                break;
            default: break;
        }
        return b;
    }
    static n(a) {
        switch (a) {
            case 9: return 5;
            case 6: return 3;
            case 5: return 8;
            case 8: return 6;
            case 4: return 9;
            case 7: return 4;
            case 3: return 7;
            case 0: return 0;
            case 1: return 2;
            case 2: return 1;
            default: break;
        }
        return 0;
    }
    static q(a, b, c) {
        b = toNullable(FormatConditionOperator_$type, null);
        c = toNullable(FormatConditionTextOperator_$type, null);
        switch (a) {
            case 10:
            case 11:
            case 8:
            case 9:
                switch (a) {
                    case 10:
                        c = toNullable(FormatConditionTextOperator_$type, 0);
                        break;
                    case 11:
                        c = toNullable(FormatConditionTextOperator_$type, 1);
                        break;
                    case 8:
                        c = toNullable(FormatConditionTextOperator_$type, 2);
                        break;
                    case 9:
                        c = toNullable(FormatConditionTextOperator_$type, 3);
                        break;
                }
                break;
            case 6:
                b = toNullable(FormatConditionOperator_$type, 0);
                break;
            case 2:
                b = toNullable(FormatConditionOperator_$type, 2);
                break;
            case 5:
                b = toNullable(FormatConditionOperator_$type, 4);
                break;
            case 4:
                b = toNullable(FormatConditionOperator_$type, 6);
                break;
            case 0:
                b = toNullable(FormatConditionOperator_$type, 5);
                break;
            case 1:
                b = toNullable(FormatConditionOperator_$type, 7);
                break;
            case 7:
                b = toNullable(FormatConditionOperator_$type, 1);
                break;
            case 3:
                b = toNullable(FormatConditionOperator_$type, 3);
                break;
            default: break;
        }
        return {
            p1: b,
            p2: c
        };
    }
    static j(a) {
        switch (a) {
            case 0: return 6;
            case 2: return 2;
            case 4: return 5;
            case 6: return 4;
            case 5: return 0;
            case 7: return 1;
            case 1: return 7;
            case 3: return 3;
            default: return 5;
        }
    }
    static k(a) {
        switch (a) {
            case 0: return 10;
            case 2: return 8;
            case 3: return 9;
            case 1: return 11;
            default: return 8;
        }
    }
    static f(a) {
        let b = 1;
        switch (a) {
            case 3:
                b = 4;
                break;
            case 2:
                b = 5;
                break;
            case 0:
                b = 0;
                break;
            case 1:
                b = 1;
                break;
            case 5:
                b = 2;
                break;
            case 4:
                b = 3;
                break;
            case 6:
                b = 6;
                break;
            case 7:
                b = 7;
                break;
            default: break;
        }
        return b;
    }
    static h(a) {
        switch (a) {
            case 7: return 7;
            case 6: return 6;
            case 3: return 4;
            case 5: return 2;
            case 4: return 3;
            case 0: return 0;
            case 1: return 1;
            case 2: return 5;
            default: return 1;
        }
    }
    static b(a) {
        return a == 2 ? -5004 : a == 1 ? -5003 : -5002;
    }
    static m(a) {
        return a == -5003 ? 1 : a == -5004 ? 2 : 0;
    }
    static a(a) {
        return a == 1 ? 1 : a == 2 ? 2 : 0;
    }
    static l(a) {
        return a == 2 ? 2 : a == 1 ? 1 : 0;
    }
    static c(a) {
        return a ? 1 : 0;
    }
    static o(a) {
        return a == 1;
    }
    static p(a, b, c, d) {
        d = ((() => { let e = IconSetConditionalFormat._cp(a, b); b = e.p1; return e.ret; })());
        c = ExcelUtils.ai(b);
        return {
            p2: c,
            p3: d
        };
    }
    static i(a) {
        switch (a) {
            case 0: return 10;
            case 2: return 8;
            case 3: return 9;
            case 1: return 11;
            default: break;
        }
        return 8;
    }
}
EnumConverter.$t = markType(EnumConverter, 'EnumConverter');
//# sourceMappingURL=EnumConverter.js.map