/*
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 { Base, toNullable, fromEnum, markType, getInstanceType } from "igniteui-angular-core";
import { ST_FilterOperator_$type } from "./ST_FilterOperator";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
/**
 * @hidden
 */
export class CT_CustomFilter extends Base {
    constructor() {
        super();
        this.a = 2;
        this.e = null;
        this.b = toNullable(ST_FilterOperator_$type, null);
        this.d = null;
    }
    static f(a, b, c) {
        b = toNullable(ST_FilterOperator_$type, null);
        c = null;
        for (let d of fromEnum(a.ab.u)) {
            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;
            }
        }
        return {
            p1: b,
            p2: c
        };
    }
    static g(a, b, c, d) {
        a.ad.p(b, null);
        let e = null;
        let 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);
        }
    }
    toString() {
        let a = getInstanceType(this);
        return a != null ? a.typeName : super.toString();
    }
}
CT_CustomFilter.$t = markType(CT_CustomFilter, 'CT_CustomFilter');
//# sourceMappingURL=CT_CustomFilter.js.map