/*
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 { List$1 } from "igniteui-angular-core";
import { CT_Index } from "./CT_Index";
import { CT_ExtensionList } from "./CT_ExtensionList";
import { CultureInfo } from "igniteui-angular-core";
import { ST_OnOff } from "./ST_OnOff";
import { parseUInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_PivotAreaReference = /** @class */ (function (_super) {
    tslib_1.__extends(CT_PivotAreaReference, _super);
    function CT_PivotAreaReference() {
        var _this = _super.call(this) || this;
        _this.af = null;
        _this.a = null;
        _this.ag = toNullable(Number_$type, null);
        _this.ai = 0;
        _this.z = false;
        _this.c = false;
        _this.y = false;
        _this.r = false;
        _this.ac = false;
        _this.d = false;
        _this.b = false;
        _this.v = false;
        _this.w = false;
        _this.x = false;
        _this.e = false;
        _this.ab = false;
        _this.aa = false;
        _this.ae = false;
        _this.ad = false;
        _this.af = new List$1(CT_Index.$, 0);
        return _this;
    }
    CT_PivotAreaReference.aj = function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) {
        var e_1, _a;
        b = toNullable(Number_$type, null);
        c = 0;
        d = false;
        e = false;
        f = false;
        g = false;
        h = false;
        i = false;
        j = false;
        k = false;
        l = false;
        m = false;
        n = false;
        o = false;
        p = false;
        q = false;
        r = false;
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var s = _c.value;
                switch (s.a.e(a.d)) {
                    case "field":
                        b = toNullable(Number_$type, parseUInt32_1(s.d, CultureInfo.invariantCulture));
                        break;
                    case "count":
                        c = parseUInt32_1(s.d, CultureInfo.invariantCulture);
                        break;
                    case "selected":
                        d = ST_OnOff.e(s.d);
                        break;
                    case "byPosition":
                        e = ST_OnOff.e(s.d);
                        break;
                    case "relative":
                        f = ST_OnOff.e(s.d);
                        break;
                    case "defaultSubtotal":
                        g = ST_OnOff.e(s.d);
                        break;
                    case "sumSubtotal":
                        h = ST_OnOff.e(s.d);
                        break;
                    case "countASubtotal":
                        i = ST_OnOff.e(s.d);
                        break;
                    case "avgSubtotal":
                        j = ST_OnOff.e(s.d);
                        break;
                    case "maxSubtotal":
                        k = ST_OnOff.e(s.d);
                        break;
                    case "minSubtotal":
                        l = ST_OnOff.e(s.d);
                        break;
                    case "productSubtotal":
                        m = ST_OnOff.e(s.d);
                        break;
                    case "countSubtotal":
                        n = ST_OnOff.e(s.d);
                        break;
                    case "stdDevSubtotal":
                        o = ST_OnOff.e(s.d);
                        break;
                    case "stdDevPSubtotal":
                        p = ST_OnOff.e(s.d);
                        break;
                    case "varSubtotal":
                        q = ST_OnOff.e(s.d);
                        break;
                    case "varPSubtotal":
                        r = ST_OnOff.e(s.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,
            p15: p,
            p16: q,
            p17: r
        };
    };
    CT_PivotAreaReference.ak = function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) {
        a.ad.p(b, null);
        var t = null;
        var u = null;
        if (c.hasValue) {
            u = "field";
            t = c.value.toString();
            a.ad.h(u, t);
        }
        u = "avgSubtotal";
        t = ST_OnOff.g(d);
        a.ad.h(u, t);
        u = "byPosition";
        t = ST_OnOff.g(e);
        a.ad.h(u, t);
        u = "count";
        t = f.toString();
        a.ad.h(u, t);
        u = "countASubtotal";
        t = ST_OnOff.g(g);
        a.ad.h(u, t);
        u = "countSubtotal";
        t = ST_OnOff.g(h);
        a.ad.h(u, t);
        u = "defaultSubtotal";
        t = ST_OnOff.g(i);
        a.ad.h(u, t);
        u = "maxSubtotal";
        t = ST_OnOff.g(j);
        a.ad.h(u, t);
        u = "minSubtotal";
        t = ST_OnOff.g(k);
        a.ad.h(u, t);
        u = "productSubtotal";
        t = ST_OnOff.g(l);
        a.ad.h(u, t);
        u = "relative";
        t = ST_OnOff.g(m);
        a.ad.h(u, t);
        u = "selected";
        t = ST_OnOff.g(n);
        a.ad.h(u, t);
        u = "stdDevPSubtotal";
        t = ST_OnOff.g(o);
        a.ad.h(u, t);
        u = "stdDevSubtotal";
        t = ST_OnOff.g(p);
        a.ad.h(u, t);
        u = "sumSubtotal";
        t = ST_OnOff.g(q);
        a.ad.h(u, t);
        u = "varPSubtotal";
        t = ST_OnOff.g(r);
        a.ad.h(u, t);
        u = "varSubtotal";
        t = ST_OnOff.g(s);
        a.ad.h(u, t);
    };
    CT_PivotAreaReference.prototype.setProperty = function (a, b) {
        switch (a) {
            case 1888:
                this.af.add(typeCast(CT_Index.$, b));
                break;
            case 601:
                this.a = typeCast(CT_ExtensionList.$, b);
                break;
            default: break;
        }
    };
    CT_PivotAreaReference.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_PivotAreaReference.$t = markType(CT_PivotAreaReference, 'CT_PivotAreaReference', Base.$, [ISupportSetProperty_$type]);
    return CT_PivotAreaReference;
}(Base));
export { CT_PivotAreaReference };
//# sourceMappingURL=CT_PivotAreaReference.js.map