/*
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, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { CT_PivotAreaReferences } from "./CT_PivotAreaReferences";
import { CT_ExtensionList } from "./CT_ExtensionList";
import { ST_PivotAreaType_$type } from "./ST_PivotAreaType";
import { ST_Axis_$type } from "./ST_Axis";
import { CultureInfo } from "igniteui-angular-core";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { ST_OnOff } from "./ST_OnOff";
import { parseInt32_1, parseUInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_PivotArea = /** @class */ (function (_super) {
    tslib_1.__extends(CT_PivotArea, _super);
    function CT_PivotArea() {
        var _this = _super.call(this) || this;
        _this.d = null;
        _this.b = null;
        _this.af = toNullable(Number_$type, null);
        _this.g = 0;
        _this.m = false;
        _this.z = false;
        _this.x = false;
        _this.v = false;
        _this.i = false;
        _this.ab = false;
        _this.aj = null;
        _this.k = false;
        _this.ad = toNullable(ST_Axis_$type, null);
        _this.ah = toNullable(Number_$type, null);
        return _this;
    }
    Object.defineProperty(CT_PivotArea.prototype, "c", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            this.d = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "a", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            this.b = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "ae", {
        get: function () {
            return this.af;
        },
        set: function (a) {
            this.af = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "f", {
        get: function () {
            return this.g;
        },
        set: function (a) {
            this.g = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "l", {
        get: function () {
            return this.m;
        },
        set: function (a) {
            this.m = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "y", {
        get: function () {
            return this.z;
        },
        set: function (a) {
            this.z = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "w", {
        get: function () {
            return this.x;
        },
        set: function (a) {
            this.x = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "u", {
        get: function () {
            return this.v;
        },
        set: function (a) {
            this.v = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "h", {
        get: function () {
            return this.i;
        },
        set: function (a) {
            this.i = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "aa", {
        get: function () {
            return this.ab;
        },
        set: function (a) {
            this.ab = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "ai", {
        get: function () {
            return this.aj;
        },
        set: function (a) {
            this.aj = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "j", {
        get: function () {
            return this.k;
        },
        set: function (a) {
            this.k = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "ac", {
        get: function () {
            return this.ad;
        },
        set: function (a) {
            this.ad = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CT_PivotArea.prototype, "ag", {
        get: function () {
            return this.ah;
        },
        set: function (a) {
            this.ah = a;
        },
        enumerable: true,
        configurable: true
    });
    CT_PivotArea.al = function (a, b, c, d, e, f, g, h, i, j, k, l, m) {
        var e_1, _a;
        b = toNullable(Number_$type, null);
        c = 0;
        d = false;
        e = false;
        f = false;
        g = false;
        h = false;
        i = false;
        j = null;
        k = false;
        l = toNullable(ST_Axis_$type, null);
        m = toNullable(Number_$type, null);
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var n = _c.value;
                switch (n.a.e(a.d)) {
                    case "field":
                        b = toNullable(Number_$type, parseInt32_1(n.d, CultureInfo.invariantCulture));
                        break;
                    case "type":
                        c = XmlNamespaceDefinitionBase.b(ST_PivotAreaType_$type, n.d);
                        break;
                    case "dataOnly":
                        d = ST_OnOff.e(n.d);
                        break;
                    case "labelOnly":
                        e = ST_OnOff.e(n.d);
                        break;
                    case "grandRow":
                        f = ST_OnOff.e(n.d);
                        break;
                    case "grandCol":
                        g = ST_OnOff.e(n.d);
                        break;
                    case "cacheIndex":
                        h = ST_OnOff.e(n.d);
                        break;
                    case "outline":
                        i = ST_OnOff.e(n.d);
                        break;
                    case "offset":
                        j = n.d;
                        break;
                    case "collapsedLevelsAreSubtotals":
                        k = ST_OnOff.e(n.d);
                        break;
                    case "axis":
                        l = toNullable(ST_Axis_$type, XmlNamespaceDefinitionBase.b(ST_Axis_$type, n.d));
                        break;
                    case "fieldPosition":
                        m = toNullable(Number_$type, parseUInt32_1(n.d, CultureInfo.invariantCulture));
                        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
        };
    };
    CT_PivotArea.am = function (a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
        a.ad.p(b, null);
        var o = null;
        var p = null;
        if (c.hasValue) {
            p = "axis";
            o = XmlNamespaceDefinitionBase.f(ST_Axis_$type, c.value);
            a.ad.h(p, o);
        }
        if (d.hasValue) {
            p = "field";
            o = d.value.toString();
            a.ad.h(p, o);
        }
        if (e.hasValue) {
            p = "fieldPosition";
            o = e.value.toString();
            a.ad.h(p, o);
        }
        p = "cacheIndex";
        o = ST_OnOff.g(f);
        a.ad.h(p, o);
        p = "collapsedLevelsAreSubtotals";
        o = ST_OnOff.g(g);
        a.ad.h(p, o);
        p = "dataOnly";
        o = ST_OnOff.g(h);
        a.ad.h(p, o);
        p = "grandCol";
        o = ST_OnOff.g(i);
        a.ad.h(p, o);
        p = "grandRow";
        o = ST_OnOff.g(j);
        a.ad.h(p, o);
        p = "labelOnly";
        o = ST_OnOff.g(k);
        a.ad.h(p, o);
        if (l != null) {
            p = "offset";
            o = l;
            a.ad.h(p, o);
        }
        p = "outline";
        o = ST_OnOff.g(m);
        a.ad.h(p, o);
        p = "type";
        o = XmlNamespaceDefinitionBase.f(ST_PivotAreaType_$type, n);
        a.ad.h(p, o);
        ;
    };
    CT_PivotArea.prototype.setProperty = function (a, b) {
        switch (a) {
            case 1337:
                this.c = typeCast(CT_PivotAreaReferences.$, b);
                break;
            case 601:
                this.a = typeCast(CT_ExtensionList.$, b);
                break;
            default: break;
        }
    };
    CT_PivotArea.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_PivotArea.$t = markType(CT_PivotArea, 'CT_PivotArea', Base.$, [ISupportSetProperty_$type]);
    return CT_PivotArea;
}(Base));
export { CT_PivotArea };
//# sourceMappingURL=CT_PivotArea.js.map