/*
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, fromEnum, markType, getInstanceType } from "igniteui-angular-core";
import { ST_BevelPresetType_$type } from "./ST_BevelPresetType";
import { CultureInfo } from "igniteui-angular-core";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { parseInt64_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
export let CT_Bevel = /*@__PURE__*/ (() => {
    class CT_Bevel extends Base {
        constructor() {
            super();
            this.j = toNullable(Number_$type, null);
            this.f = toNullable(Number_$type, null);
            this.h = toNullable(ST_BevelPresetType_$type, null);
        }
        get i() {
            return this.j;
        }
        set i(a) {
            this.j = a;
        }
        get e() {
            return this.f;
        }
        set e(a) {
            this.f = a;
        }
        get g() {
            return this.h;
        }
        set g(a) {
            this.h = a;
        }
        static a(a) {
            let b = toNullable(Number_$type, null);
            let c = toNullable(Number_$type, null);
            let d = toNullable(ST_BevelPresetType_$type, null);
            let e = CT_Bevel.l(a, b, c, d);
            b = e.p1;
            c = e.p2;
            d = e.p3;
            return ((() => {
                let $ret = new CT_Bevel();
                $ret.e = c;
                $ret.g = d;
                $ret.i = b;
                return $ret;
            })());
        }
        static l(a, b, c, d) {
            b = toNullable(Number_$type, null);
            c = toNullable(Number_$type, null);
            d = toNullable(ST_BevelPresetType_$type, null);
            for (let e of fromEnum(a.ab.u)) {
                switch (e.a.e(a.d)) {
                    case "w":
                        b = toNullable(Number_$type, parseInt64_1(e.d, CultureInfo.invariantCulture));
                        break;
                    case "h":
                        c = toNullable(Number_$type, parseInt64_1(e.d, CultureInfo.invariantCulture));
                        break;
                    case "prst":
                        d = toNullable(ST_BevelPresetType_$type, XmlNamespaceDefinitionBase.b(ST_BevelPresetType_$type, e.d));
                        break;
                    default: break;
                }
            }
            ;
            return {
                p1: b,
                p2: c,
                p3: d
            };
        }
        static m(a, b, c = toNullable(Number_$type, null), d = toNullable(ST_BevelPresetType_$type, null), e = toNullable(Number_$type, null)) {
            a.ad.p(b, "a");
            let f = null;
            let g = null;
            if (c.hasValue) {
                g = "h";
                f = c.value.toString();
                a.ad.h(g, f);
            }
            if (d.hasValue) {
                g = "prst";
                f = XmlNamespaceDefinitionBase.p(ST_BevelPresetType_$type, d.value);
                a.ad.h(g, f);
            }
            if (e.hasValue) {
                g = "w";
                f = e.value.toString();
                a.ad.h(g, f);
            }
            ;
        }
        toString() {
            let a = getInstanceType(this);
            return a != null ? a.typeName : super.toString();
        }
    }
    CT_Bevel.$t = markType(CT_Bevel, 'CT_Bevel');
    return CT_Bevel;
})();
