/*
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 { 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
 */
var CT_CfRule_SML2009 = /** @class */ (function (_super) {
    tslib_1.__extends(CT_CfRule_SML2009, _super);
    function CT_CfRule_SML2009() {
        var _this = _super.call(this) || this;
        _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;
        return _this;
    }
    Object.defineProperty(CT_CfRule_SML2009.prototype, "q", {
        get: function () {
            return this.r;
        },
        set: function (a) {
            this.r = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "c", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            this.d = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "e", {
        get: function () {
            return this.f;
        },
        set: function (a) {
            this.f = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "i", {
        get: function () {
            return this.j;
        },
        set: function (a) {
            this.j = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "g", {
        get: function () {
            return this.h;
        },
        set: function (a) {
            this.h = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "a", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            this.b = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "ao", {
        get: function () {
            return this.ap;
        },
        set: function (a) {
            this.ap = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "ae", {
        get: function () {
            return this.af;
        },
        set: function (a) {
            this.af = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "ak", {
        get: function () {
            return this.al;
        },
        set: function (a) {
            this.al = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "s", {
        get: function () {
            return this.t;
        },
        set: function (a) {
            this.t = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "ac", {
        get: function () {
            return this.ad;
        },
        set: function (a) {
            this.ad = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "w", {
        get: function () {
            return this.x;
        },
        set: function (a) {
            this.x = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "aa", {
        get: function () {
            return this.ab;
        },
        set: function (a) {
            this.ab = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "as", {
        get: function () {
            return this.at;
        },
        set: function (a) {
            this.at = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "am", {
        get: function () {
            return this.an;
        },
        set: function (a) {
            this.an = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "ag", {
        get: function () {
            return this.ah;
        },
        set: function (a) {
            this.ah = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "ai", {
        get: function () {
            return this.aj;
        },
        set: function (a) {
            this.aj = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "y", {
        get: function () {
            return this.z;
        },
        set: function (a) {
            this.z = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "u", {
        get: function () {
            return this.v;
        },
        set: function (a) {
            this.v = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_CfRule_SML2009.prototype, "aq", {
        get: function () {
            return this.ar;
        },
        set: function (a) {
            this.ar = a;
        },
        enumerable: true,
        configurable: true
    });
    CT_CfRule_SML2009.au = function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
        var e_1, _a;
        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;
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var p = _c.value;
                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;
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            }
            finally { if (e_1) throw e_1.error; }
        }
        ;
        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
        };
    };
    CT_CfRule_SML2009.av = function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
        if (c === void 0) { c = toNullable(ST_ConditionalFormattingOperator_$type, null); }
        if (d === void 0) { d = toNullable(Boolean_$type, null); }
        if (e === void 0) { e = toNullable(Boolean_$type, null); }
        if (f === void 0) { f = toNullable(Boolean_$type, null); }
        if (g === void 0) { g = toNullable(Boolean_$type, null); }
        if (h === void 0) { h = null; }
        if (i === void 0) { i = toNullable(Boolean_$type, null); }
        if (j === void 0) { j = toNullable(Number_$type, null); }
        if (k === void 0) { k = toNullable(Number_$type, null); }
        if (l === void 0) { l = toNullable(Number_$type, null); }
        if (m === void 0) { m = toNullable(Boolean_$type, null); }
        if (n === void 0) { n = null; }
        if (o === void 0) { o = toNullable(ST_TimePeriod_$type, null); }
        if (p === void 0) { p = toNullable(ST_CfType_$type, null); }
        a.ad.p(b, null);
        var q = null;
        var 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');
    return CT_CfRule_SML2009;
}(Base));
export { CT_CfRule_SML2009 };
//# sourceMappingURL=CT_CfRule_SML2009.js.map