/*
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 { __extends, __values } from "tslib";
import { Base, toNullable, Boolean_$type, fromEnum, markType } from "igniteui-angular-core";
import { ST_TabularSlicerCacheSortOrder_$type } from "./ST_TabularSlicerCacheSortOrder";
import { ST_SlicerCacheCrossFilter_$type } from "./ST_SlicerCacheCrossFilter";
import { CultureInfo } from "igniteui-angular-core";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { ST_OnOff } from "./ST_OnOff";
import { parseUInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_TabularSlicerCache = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CT_TabularSlicerCache, _super);
    function CT_TabularSlicerCache() {
        var _this = _super.call(this) || this;
        _this.d = null;
        _this.b = null;
        _this.r = 0;
        _this.p = toNullable(ST_TabularSlicerCacheSortOrder_$type, null);
        _this.l = toNullable(Boolean_$type, null);
        _this.n = toNullable(Boolean_$type, null);
        _this.j = toNullable(ST_SlicerCacheCrossFilter_$type, null);
        return _this;
    }
    Object.defineProperty(CT_TabularSlicerCache.prototype, "c", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            this.d = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_TabularSlicerCache.prototype, "a", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            this.b = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_TabularSlicerCache.prototype, "q", {
        get: function () {
            return this.r;
        },
        set: function (a) {
            this.r = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_TabularSlicerCache.prototype, "o", {
        get: function () {
            return this.p;
        },
        set: function (a) {
            this.p = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_TabularSlicerCache.prototype, "k", {
        get: function () {
            return this.l;
        },
        set: function (a) {
            this.l = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_TabularSlicerCache.prototype, "m", {
        get: function () {
            return this.n;
        },
        set: function (a) {
            this.n = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_TabularSlicerCache.prototype, "i", {
        get: function () {
            return this.j;
        },
        set: function (a) {
            this.j = a;
        },
        enumerable: false,
        configurable: true
    });
    CT_TabularSlicerCache.s = function (a, b, c, d, e, f) {
        var e_1, _a;
        b = 0;
        c = toNullable(ST_TabularSlicerCacheSortOrder_$type, null);
        d = toNullable(Boolean_$type, null);
        e = toNullable(Boolean_$type, null);
        f = toNullable(ST_SlicerCacheCrossFilter_$type, null);
        try {
            for (var _b = __values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var g = _c.value;
                switch (g.a.e(a.d)) {
                    case "pivotCacheId":
                        b = parseUInt32_1(g.d, CultureInfo.invariantCulture);
                        break;
                    case "sortOrder":
                        c = toNullable(ST_TabularSlicerCacheSortOrder_$type, XmlNamespaceDefinitionBase.b(ST_TabularSlicerCacheSortOrder_$type, g.d));
                        break;
                    case "customListSort":
                        d = toNullable(Boolean_$type, ST_OnOff.e(g.d));
                        break;
                    case "showMissing":
                        e = toNullable(Boolean_$type, ST_OnOff.e(g.d));
                        break;
                    case "crossFilter":
                        f = toNullable(ST_SlicerCacheCrossFilter_$type, XmlNamespaceDefinitionBase.b(ST_SlicerCacheCrossFilter_$type, g.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
        };
    };
    CT_TabularSlicerCache.t = function (a, b, c, d, e, f, g) {
        a.ad.p(b, null);
        var h = null;
        var i = null;
        if (c.hasValue) {
            i = "crossFilter";
            h = XmlNamespaceDefinitionBase.p(ST_SlicerCacheCrossFilter_$type, c.value);
            a.ad.h(i, h);
        }
        if (d.hasValue) {
            i = "customListSort";
            h = ST_OnOff.g(d.value);
            a.ad.h(i, h);
        }
        if (e.hasValue) {
            i = "showMissing";
            h = ST_OnOff.g(e.value);
            a.ad.h(i, h);
        }
        if (f.hasValue) {
            i = "sortOrder";
            h = XmlNamespaceDefinitionBase.p(ST_TabularSlicerCacheSortOrder_$type, f.value);
            a.ad.h(i, h);
        }
        i = "pivotCacheId";
        h = g.toString();
        a.ad.h(i, h);
        ;
    };
    CT_TabularSlicerCache.$t = markType(CT_TabularSlicerCache, 'CT_TabularSlicerCache');
    return CT_TabularSlicerCache;
}(Base));
export { CT_TabularSlicerCache };
