/*
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, fromEnum, markType, getInstanceType } from "igniteui-angular-core";
import { ST_FilterOperator_$type } from "./ST_FilterOperator";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
/**
 * @hidden
 */
var CT_CustomFilter = /** @class */ (function (_super) {
    tslib_1.__extends(CT_CustomFilter, _super);
    function CT_CustomFilter() {
        var _this = _super.call(this) || this;
        _this.a = 2;
        _this.e = null;
        _this.b = toNullable(ST_FilterOperator_$type, null);
        _this.d = null;
        return _this;
    }
    CT_CustomFilter.f = function (a, b, c) {
        var e_1, _a;
        b = toNullable(ST_FilterOperator_$type, null);
        c = null;
        try {
            for (var _b = tslib_1.__values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                switch (d.a.e(a.d)) {
                    case "operator":
                        b = toNullable(ST_FilterOperator_$type, XmlNamespaceDefinitionBase.b(ST_FilterOperator_$type, d.d));
                        break;
                    case "val":
                        c = d.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
        };
    };
    CT_CustomFilter.g = function (a, b, c, d) {
        a.ad.p(b, null);
        var e = null;
        var f = null;
        if (c.hasValue) {
            f = "operator";
            e = XmlNamespaceDefinitionBase.f(ST_FilterOperator_$type, c.value);
            a.ad.h(f, e);
        }
        if (d != null) {
            f = "val";
            e = d;
            a.ad.h(f, e);
        }
    };
    CT_CustomFilter.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_CustomFilter.$t = markType(CT_CustomFilter, 'CT_CustomFilter');
    return CT_CustomFilter;
}(Base));
export { CT_CustomFilter };
//# sourceMappingURL=CT_CustomFilter.js.map