/*
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, Number_$type, Boolean_$type, fromEnum, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { CT_LineProperties_DML } from "./CT_LineProperties_DML";
import { CT_Cell3D } from "./CT_Cell3D";
import { CT_OfficeArtExtensionList } from "./CT_OfficeArtExtensionList";
import { ST_TextVerticalType_$type } from "./ST_TextVerticalType";
import { ST_TextAnchoringType_$type } from "./ST_TextAnchoringType";
import { ST_TextHorzOverflowType_$type } from "./ST_TextHorzOverflowType";
import { EG_FillProperties } from "./EG_FillProperties";
import { CultureInfo } from "igniteui-angular-core";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { ST_OnOff } from "./ST_OnOff";
import { parseInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
export let CT_TableCellProperties = /*@__PURE__*/ (() => {
    class CT_TableCellProperties extends Base {
        constructor() {
            super();
            this.h = null;
            this.j = null;
            this.l = null;
            this.d = null;
            this.n = null;
            this.f = null;
            this.b = null;
            this.p = null;
            this.ag = toNullable(Number_$type, null);
            this.ai = toNullable(Number_$type, null);
            this.ak = toNullable(Number_$type, null);
            this.ae = toNullable(Number_$type, null);
            this.am = toNullable(ST_TextVerticalType_$type, null);
            this.aa = toNullable(ST_TextAnchoringType_$type, null);
            this.z = toNullable(Boolean_$type, null);
            this.ac = toNullable(ST_TextHorzOverflowType_$type, null);
            this.q = null;
        }
        get g() {
            return this.h;
        }
        set g(a) {
            this.h = a;
        }
        get i() {
            return this.j;
        }
        set i(a) {
            this.j = a;
        }
        get k() {
            return this.l;
        }
        set k(a) {
            this.l = a;
        }
        get c() {
            return this.d;
        }
        set c(a) {
            this.d = a;
        }
        get m() {
            return this.n;
        }
        set m(a) {
            this.n = a;
        }
        get e() {
            return this.f;
        }
        set e(a) {
            this.f = a;
        }
        get a() {
            return this.b;
        }
        set a(a) {
            this.b = a;
        }
        get o() {
            return this.p;
        }
        set o(a) {
            this.p = a;
        }
        get af() {
            return this.ag;
        }
        set af(a) {
            this.ag = a;
        }
        get ah() {
            return this.ai;
        }
        set ah(a) {
            this.ai = a;
        }
        get aj() {
            return this.ak;
        }
        set aj(a) {
            this.ak = a;
        }
        get ad() {
            return this.ae;
        }
        set ad(a) {
            this.ae = a;
        }
        get al() {
            return this.am;
        }
        set al(a) {
            this.am = a;
        }
        get x() {
            return this.aa;
        }
        set x(a) {
            this.aa = a;
        }
        get y() {
            return this.z;
        }
        set y(a) {
            this.z = a;
        }
        get ab() {
            return this.ac;
        }
        set ab(a) {
            this.ac = a;
        }
        get r() {
            if (this.q == null) {
                this.q = new EG_FillProperties();
            }
            return this.q;
        }
        static ao(a, b, c, d, e, f, g, h, i) {
            b = toNullable(Number_$type, null);
            c = toNullable(Number_$type, null);
            d = toNullable(Number_$type, null);
            e = toNullable(Number_$type, null);
            f = toNullable(ST_TextVerticalType_$type, null);
            g = toNullable(ST_TextAnchoringType_$type, null);
            h = toNullable(Boolean_$type, null);
            i = toNullable(ST_TextHorzOverflowType_$type, null);
            for (let j of fromEnum(a.ab.u)) {
                switch (j.a.e(a.d)) {
                    case "marL":
                        b = toNullable(Number_$type, parseInt32_1(j.d, CultureInfo.invariantCulture));
                        break;
                    case "marR":
                        c = toNullable(Number_$type, parseInt32_1(j.d, CultureInfo.invariantCulture));
                        break;
                    case "marT":
                        d = toNullable(Number_$type, parseInt32_1(j.d, CultureInfo.invariantCulture));
                        break;
                    case "marB":
                        e = toNullable(Number_$type, parseInt32_1(j.d, CultureInfo.invariantCulture));
                        break;
                    case "vert":
                        f = toNullable(ST_TextVerticalType_$type, XmlNamespaceDefinitionBase.b(ST_TextVerticalType_$type, j.d));
                        break;
                    case "anchor":
                        g = toNullable(ST_TextAnchoringType_$type, XmlNamespaceDefinitionBase.b(ST_TextAnchoringType_$type, j.d));
                        break;
                    case "anchorCtr":
                        h = toNullable(Boolean_$type, ST_OnOff.e(j.d));
                        break;
                    case "horzOverflow":
                        i = toNullable(ST_TextHorzOverflowType_$type, XmlNamespaceDefinitionBase.b(ST_TextHorzOverflowType_$type, j.d));
                        break;
                    default: break;
                }
            }
            ;
            return {
                p1: b,
                p2: c,
                p3: d,
                p4: e,
                p5: f,
                p6: g,
                p7: h,
                p8: i
            };
        }
        static ap(a, b, c = toNullable(ST_TextAnchoringType_$type, null), d = toNullable(Boolean_$type, null), e = toNullable(ST_TextHorzOverflowType_$type, null), f = toNullable(Number_$type, null), g = toNullable(Number_$type, null), h = toNullable(Number_$type, null), i = toNullable(Number_$type, null), j = toNullable(ST_TextVerticalType_$type, null)) {
            a.ad.p(b, "a");
            let k = null;
            let l = null;
            if (c.hasValue) {
                l = "anchor";
                k = XmlNamespaceDefinitionBase.p(ST_TextAnchoringType_$type, c.value);
                a.ad.h(l, k);
            }
            if (d.hasValue) {
                l = "anchorCtr";
                k = ST_OnOff.g(d.value);
                a.ad.h(l, k);
            }
            if (e.hasValue) {
                l = "horzOverflow";
                k = XmlNamespaceDefinitionBase.p(ST_TextHorzOverflowType_$type, e.value);
                a.ad.h(l, k);
            }
            if (f.hasValue) {
                l = "marB";
                k = f.value.toString();
                a.ad.h(l, k);
            }
            if (g.hasValue) {
                l = "marL";
                k = g.value.toString();
                a.ad.h(l, k);
            }
            if (h.hasValue) {
                l = "marR";
                k = h.value.toString();
                a.ad.h(l, k);
            }
            if (i.hasValue) {
                l = "marT";
                k = i.value.toString();
                a.ad.h(l, k);
            }
            if (j.hasValue) {
                l = "vert";
                k = XmlNamespaceDefinitionBase.p(ST_TextVerticalType_$type, j.value);
                a.ad.h(l, k);
            }
            ;
        }
        setProperty(a, b) {
            switch (a) {
                case 922:
                    this.g = typeCast(CT_LineProperties_DML.$, b);
                    break;
                case 924:
                    this.i = typeCast(CT_LineProperties_DML.$, b);
                    break;
                case 928:
                    this.k = typeCast(CT_LineProperties_DML.$, b);
                    break;
                case 919:
                    this.c = typeCast(CT_LineProperties_DML.$, b);
                    break;
                case 929:
                    this.m = typeCast(CT_LineProperties_DML.$, b);
                    break;
                case 920:
                    this.e = typeCast(CT_LineProperties_DML.$, b);
                    break;
                case 235:
                    this.a = typeCast(CT_Cell3D.$, b);
                    break;
                case 601:
                    this.o = typeCast(CT_OfficeArtExtensionList.$, b);
                    break;
                default:
                    if (this.r.f(a)) {
                        this.r.j(a, b);
                        return;
                    }
                    break;
            }
        }
        toString() {
            let a = getInstanceType(this);
            return a != null ? a.typeName : super.toString();
        }
    }
    CT_TableCellProperties.$t = markType(CT_TableCellProperties, 'CT_TableCellProperties', Base.$, [ISupportSetProperty_$type]);
    return CT_TableCellProperties;
})();
