/*
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, fromEnum, markType } from "igniteui-angular-core";
import { ST_PivotShowAs_$type } from "./ST_PivotShowAs";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { CultureInfo } from "igniteui-angular-core";
import { parseUInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_DataField_SML2009 = /** @class */ (function (_super) {
    tslib_1.__extends(CT_DataField_SML2009, _super);
    function CT_DataField_SML2009() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.b = toNullable(ST_PivotShowAs_$type, null);
        _this.d = toNullable(Number_$type, null);
        _this.f = null;
        return _this;
    }
    Object.defineProperty(CT_DataField_SML2009.prototype, "a", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            this.b = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_DataField_SML2009.prototype, "c", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            this.d = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_DataField_SML2009.prototype, "e", {
        get: function () {
            return this.f;
        },
        set: function (a) {
            this.f = a;
        },
        enumerable: true,
        configurable: true
    });
    CT_DataField_SML2009.g = function (a, b, c, d) {
        var e_1, _a;
        b = toNullable(ST_PivotShowAs_$type, null);
        c = toNullable(Number_$type, null);
        d = null;
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var e = _c.value;
                switch (e.a.e(a.d)) {
                    case "pivotShowAs":
                        b = toNullable(ST_PivotShowAs_$type, XmlNamespaceDefinitionBase.b(ST_PivotShowAs_$type, e.d));
                        break;
                    case "sourceField":
                        c = toNullable(Number_$type, parseUInt32_1(e.d, CultureInfo.invariantCulture));
                        break;
                    case "uniqueName":
                        d = e.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
        };
    };
    CT_DataField_SML2009.h = function (a, b, c, d, e) {
        if (c === void 0) { c = toNullable(ST_PivotShowAs_$type, null); }
        if (d === void 0) { d = toNullable(Number_$type, null); }
        if (e === void 0) { e = null; }
        a.ad.p(b, null);
        var f = null;
        var g = null;
        if (c.hasValue) {
            g = "pivotShowAs";
            f = XmlNamespaceDefinitionBase.f(ST_PivotShowAs_$type, c.value);
            a.ad.h(g, f);
        }
        if (d.hasValue) {
            g = "sourceField";
            f = d.value.toString();
            a.ad.h(g, f);
        }
        if (e != null) {
            g = "uniqueName";
            f = e;
            a.ad.h(g, f);
        }
        ;
    };
    CT_DataField_SML2009.$t = markType(CT_DataField_SML2009, 'CT_DataField_SML2009');
    return CT_DataField_SML2009;
}(Base));
export { CT_DataField_SML2009 };
//# sourceMappingURL=CT_DataField_SML2009.js.map