/*
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, Boolean_$type, fromEnum, typeCast, String_$type, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { ST_DataValidationType_$type } from "./ST_DataValidationType";
import { ST_DataValidationErrorStyle_$type } from "./ST_DataValidationErrorStyle";
import { ST_DataValidationImeMode_$type } from "./ST_DataValidationImeMode";
import { ST_DataValidationOperator_$type } from "./ST_DataValidationOperator";
import { ST_Sqref } from "./ST_Sqref";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { ST_OnOff } from "./ST_OnOff";
/**
 * @hidden
 */
export class CT_DataValidation extends Base {
    constructor() {
        super();
        this.p = null;
        this.q = null;
        this.m = toNullable(ST_DataValidationType_$type, null);
        this.g = toNullable(ST_DataValidationErrorStyle_$type, null);
        this.h = toNullable(ST_DataValidationImeMode_$type, null);
        this.i = toNullable(ST_DataValidationOperator_$type, null);
        this.f = toNullable(Boolean_$type, null);
        this.j = toNullable(Boolean_$type, null);
        this.l = toNullable(Boolean_$type, null);
        this.k = toNullable(Boolean_$type, null);
        this.o = null;
        this.n = null;
        this.s = null;
        this.r = null;
        this.a = null;
    }
    static u(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
        b = toNullable(ST_DataValidationType_$type, null);
        c = toNullable(ST_DataValidationErrorStyle_$type, null);
        d = toNullable(ST_DataValidationImeMode_$type, null);
        e = toNullable(ST_DataValidationOperator_$type, null);
        f = toNullable(Boolean_$type, null);
        g = toNullable(Boolean_$type, null);
        h = toNullable(Boolean_$type, null);
        i = toNullable(Boolean_$type, null);
        j = null;
        k = null;
        l = null;
        m = null;
        n = null;
        for (let o of fromEnum(a.ab.u)) {
            switch (o.a.e(a.d)) {
                case "type":
                    b = toNullable(ST_DataValidationType_$type, XmlNamespaceDefinitionBase.b(ST_DataValidationType_$type, o.d));
                    break;
                case "errorStyle":
                    c = toNullable(ST_DataValidationErrorStyle_$type, XmlNamespaceDefinitionBase.b(ST_DataValidationErrorStyle_$type, o.d));
                    break;
                case "imeMode":
                    d = toNullable(ST_DataValidationImeMode_$type, XmlNamespaceDefinitionBase.b(ST_DataValidationImeMode_$type, o.d));
                    break;
                case "operator":
                    e = toNullable(ST_DataValidationOperator_$type, XmlNamespaceDefinitionBase.b(ST_DataValidationOperator_$type, o.d));
                    break;
                case "allowBlank":
                    f = toNullable(Boolean_$type, ST_OnOff.e(o.d));
                    break;
                case "showDropDown":
                    g = toNullable(Boolean_$type, ST_OnOff.e(o.d));
                    break;
                case "showInputMessage":
                    h = toNullable(Boolean_$type, ST_OnOff.e(o.d));
                    break;
                case "showErrorMessage":
                    i = toNullable(Boolean_$type, ST_OnOff.e(o.d));
                    break;
                case "errorTitle":
                    j = o.d;
                    break;
                case "error":
                    k = o.d;
                    break;
                case "promptTitle":
                    l = o.d;
                    break;
                case "prompt":
                    m = o.d;
                    break;
                case "sqref":
                    n = ST_Sqref.a(o.d);
                    break;
                default: break;
            }
        }
        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
        };
    }
    static v(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {
        a.ad.p(b, null);
        let p = null;
        let q = null;
        if (c.hasValue) {
            q = "operator";
            p = XmlNamespaceDefinitionBase.f(ST_DataValidationOperator_$type, c.value);
            a.ad.h(q, p);
        }
        if (d.hasValue) {
            q = "allowBlank";
            p = ST_OnOff.g(d.value);
            a.ad.h(q, p);
        }
        if (e != null) {
            q = "error";
            p = e;
            a.ad.h(q, p);
        }
        if (f.hasValue) {
            q = "errorStyle";
            p = XmlNamespaceDefinitionBase.f(ST_DataValidationErrorStyle_$type, f.value);
            a.ad.h(q, p);
        }
        if (g != null) {
            q = "errorTitle";
            p = g;
            a.ad.h(q, p);
        }
        if (h.hasValue) {
            q = "imeMode";
            p = XmlNamespaceDefinitionBase.f(ST_DataValidationImeMode_$type, h.value);
            a.ad.h(q, p);
        }
        if (i != null) {
            q = "prompt";
            p = i;
            a.ad.h(q, p);
        }
        if (j != null) {
            q = "promptTitle";
            p = j;
            a.ad.h(q, p);
        }
        if (k.hasValue) {
            q = "showDropDown";
            p = ST_OnOff.g(k.value);
            a.ad.h(q, p);
        }
        if (l.hasValue) {
            q = "showErrorMessage";
            p = ST_OnOff.g(l.value);
            a.ad.h(q, p);
        }
        if (m.hasValue) {
            q = "showInputMessage";
            p = ST_OnOff.g(m.value);
            a.ad.h(q, p);
        }
        if (n.hasValue) {
            q = "type";
            p = XmlNamespaceDefinitionBase.f(ST_DataValidationType_$type, n.value);
            a.ad.h(q, p);
        }
        if (o != null) {
            q = "sqref";
            p = o.e();
            a.ad.h(q, p);
        }
    }
    setProperty(a, b) {
        switch (a) {
            case 678:
                this.p = typeCast(String_$type, b);
                break;
            case 679:
                this.q = typeCast(String_$type, b);
                break;
            default: break;
        }
    }
    toString() {
        let a = getInstanceType(this);
        return a != null ? a.typeName : super.toString();
    }
}
CT_DataValidation.$t = markType(CT_DataValidation, 'CT_DataValidation', Base.$, [ISupportSetProperty_$type]);
//# sourceMappingURL=CT_DataValidation.js.map