/*
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, Number_$type, Boolean_$type, fromEnum, markType } from "igniteui-angular-core";
import { ST_CfType_$type } from "./ST_CfType";
import { ST_ConditionalFormattingOperator_$type } from "./ST_ConditionalFormattingOperator";
import { ST_TimePeriod_$type } from "./ST_TimePeriod";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { CultureInfo } from "igniteui-angular-core";
import { ST_OnOff } from "./ST_OnOff";
import { parseInt32_1, parseUInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
export class CT_CfRule_SML2009 extends Base {
    constructor() {
        super();
        this.r = null;
        this.d = null;
        this.f = null;
        this.j = null;
        this.h = null;
        this.b = null;
        this.ap = toNullable(ST_CfType_$type, null);
        this.af = toNullable(Number_$type, null);
        this.al = toNullable(Boolean_$type, null);
        this.t = toNullable(Boolean_$type, null);
        this.ad = toNullable(Boolean_$type, null);
        this.x = toNullable(Boolean_$type, null);
        this.ab = toNullable(ST_ConditionalFormattingOperator_$type, null);
        this.at = null;
        this.an = toNullable(ST_TimePeriod_$type, null);
        this.ah = toNullable(Number_$type, null);
        this.aj = toNullable(Number_$type, null);
        this.z = toNullable(Boolean_$type, null);
        this.v = toNullable(Boolean_$type, null);
        this.ar = null;
    }
    get q() {
        return this.r;
    }
    set q(a) {
        this.r = a;
    }
    get c() {
        return this.d;
    }
    set c(a) {
        this.d = a;
    }
    get e() {
        return this.f;
    }
    set e(a) {
        this.f = a;
    }
    get i() {
        return this.j;
    }
    set i(a) {
        this.j = a;
    }
    get g() {
        return this.h;
    }
    set g(a) {
        this.h = a;
    }
    get a() {
        return this.b;
    }
    set a(a) {
        this.b = a;
    }
    get ao() {
        return this.ap;
    }
    set ao(a) {
        this.ap = a;
    }
    get ae() {
        return this.af;
    }
    set ae(a) {
        this.af = a;
    }
    get ak() {
        return this.al;
    }
    set ak(a) {
        this.al = a;
    }
    get s() {
        return this.t;
    }
    set s(a) {
        this.t = a;
    }
    get ac() {
        return this.ad;
    }
    set ac(a) {
        this.ad = a;
    }
    get w() {
        return this.x;
    }
    set w(a) {
        this.x = a;
    }
    get aa() {
        return this.ab;
    }
    set aa(a) {
        this.ab = a;
    }
    get as() {
        return this.at;
    }
    set as(a) {
        this.at = a;
    }
    get am() {
        return this.an;
    }
    set am(a) {
        this.an = a;
    }
    get ag() {
        return this.ah;
    }
    set ag(a) {
        this.ah = a;
    }
    get ai() {
        return this.aj;
    }
    set ai(a) {
        this.aj = a;
    }
    get y() {
        return this.z;
    }
    set y(a) {
        this.z = a;
    }
    get u() {
        return this.v;
    }
    set u(a) {
        this.v = a;
    }
    get aq() {
        return this.ar;
    }
    set aq(a) {
        this.ar = a;
    }
    static au(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
        b = toNullable(ST_CfType_$type, null);
        c = toNullable(Number_$type, null);
        d = toNullable(Boolean_$type, null);
        e = toNullable(Boolean_$type, null);
        f = toNullable(Boolean_$type, null);
        g = toNullable(Boolean_$type, null);
        h = toNullable(ST_ConditionalFormattingOperator_$type, null);
        i = null;
        j = toNullable(ST_TimePeriod_$type, null);
        k = toNullable(Number_$type, null);
        l = toNullable(Number_$type, null);
        m = toNullable(Boolean_$type, null);
        n = toNullable(Boolean_$type, null);
        o = null;
        for (let p of fromEnum(a.ab.u)) {
            switch (p.a.e(a.d)) {
                case "type":
                    b = toNullable(ST_CfType_$type, XmlNamespaceDefinitionBase.b(ST_CfType_$type, p.d));
                    break;
                case "priority":
                    c = toNullable(Number_$type, parseInt32_1(p.d, CultureInfo.invariantCulture));
                    break;
                case "stopIfTrue":
                    d = toNullable(Boolean_$type, ST_OnOff.e(p.d));
                    break;
                case "aboveAverage":
                    e = toNullable(Boolean_$type, ST_OnOff.e(p.d));
                    break;
                case "percent":
                    f = toNullable(Boolean_$type, ST_OnOff.e(p.d));
                    break;
                case "bottom":
                    g = toNullable(Boolean_$type, ST_OnOff.e(p.d));
                    break;
                case "operator":
                    h = toNullable(ST_ConditionalFormattingOperator_$type, XmlNamespaceDefinitionBase.b(ST_ConditionalFormattingOperator_$type, p.d));
                    break;
                case "text":
                    i = p.d;
                    break;
                case "timePeriod":
                    j = toNullable(ST_TimePeriod_$type, XmlNamespaceDefinitionBase.b(ST_TimePeriod_$type, p.d));
                    break;
                case "rank":
                    k = toNullable(Number_$type, parseUInt32_1(p.d, CultureInfo.invariantCulture));
                    break;
                case "stdDev":
                    l = toNullable(Number_$type, parseInt32_1(p.d, CultureInfo.invariantCulture));
                    break;
                case "equalAverage":
                    m = toNullable(Boolean_$type, ST_OnOff.e(p.d));
                    break;
                case "activePresent":
                    n = toNullable(Boolean_$type, ST_OnOff.e(p.d));
                    break;
                case "id":
                    o = p.d;
                    break;
                default: break;
            }
        }
        ;
        return {
            p1: b,
            p2: c,
            p3: d,
            p4: e,
            p5: f,
            p6: g,
            p7: h,
            p8: i,
            p9: j,
            p10: k,
            p11: l,
            p12: m,
            p13: n,
            p14: o
        };
    }
    static av(a, b, c = toNullable(ST_ConditionalFormattingOperator_$type, null), d = toNullable(Boolean_$type, null), e = toNullable(Boolean_$type, null), f = toNullable(Boolean_$type, null), g = toNullable(Boolean_$type, null), h = null, i = toNullable(Boolean_$type, null), j = toNullable(Number_$type, null), k = toNullable(Number_$type, null), l = toNullable(Number_$type, null), m = toNullable(Boolean_$type, null), n = null, o = toNullable(ST_TimePeriod_$type, null), p = toNullable(ST_CfType_$type, null)) {
        a.ad.p(b, null);
        let q = null;
        let r = null;
        if (c.hasValue) {
            r = "operator";
            q = XmlNamespaceDefinitionBase.f(ST_ConditionalFormattingOperator_$type, c.value);
            a.ad.h(r, q);
        }
        if (d.hasValue) {
            r = "aboveAverage";
            q = ST_OnOff.g(d.value);
            a.ad.h(r, q);
        }
        if (e.hasValue) {
            r = "activePresent";
            q = ST_OnOff.g(e.value);
            a.ad.h(r, q);
        }
        if (f.hasValue) {
            r = "bottom";
            q = ST_OnOff.g(f.value);
            a.ad.h(r, q);
        }
        if (g.hasValue) {
            r = "equalAverage";
            q = ST_OnOff.g(g.value);
            a.ad.h(r, q);
        }
        if (h != null) {
            r = "id";
            q = h;
            a.ad.h(r, q);
        }
        if (i.hasValue) {
            r = "percent";
            q = ST_OnOff.g(i.value);
            a.ad.h(r, q);
        }
        if (j.hasValue) {
            r = "priority";
            q = j.value.toString();
            a.ad.h(r, q);
        }
        if (k.hasValue) {
            r = "rank";
            q = k.value.toString();
            a.ad.h(r, q);
        }
        if (l.hasValue) {
            r = "stdDev";
            q = l.value.toString();
            a.ad.h(r, q);
        }
        if (m.hasValue) {
            r = "stopIfTrue";
            q = ST_OnOff.g(m.value);
            a.ad.h(r, q);
        }
        if (n != null) {
            r = "text";
            q = n;
            a.ad.h(r, q);
        }
        if (o.hasValue) {
            r = "timePeriod";
            q = XmlNamespaceDefinitionBase.f(ST_TimePeriod_$type, o.value);
            a.ad.h(r, q);
        }
        if (p.hasValue) {
            r = "type";
            q = XmlNamespaceDefinitionBase.f(ST_CfType_$type, p.value);
            a.ad.h(r, q);
        }
        ;
    }
}
CT_CfRule_SML2009.$t = markType(CT_CfRule_SML2009, 'CT_CfRule_SML2009');
//# sourceMappingURL=CT_CfRule_SML2009.js.map