/*
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 } from "igniteui-angular-core";
import { ST_SlicerStyleType_$type } from "./ST_SlicerStyleType";
import { XmlNamespaceDefinitionBase } from "./XmlNamespaceDefinitionBase";
import { CultureInfo } from "igniteui-angular-core";
import { parseUInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
export let CT_SlicerStyleElement = /*@__PURE__*/ (() => {
    class CT_SlicerStyleElement extends Base {
        constructor() {
            super(...arguments);
            this.b = 0;
            this.d = toNullable(Number_$type, null);
        }
        get a() {
            return this.b;
        }
        set a(a) {
            this.b = a;
        }
        get c() {
            return this.d;
        }
        set c(a) {
            this.d = a;
        }
        static e(a, b, c) {
            b = 0;
            c = toNullable(Number_$type, null);
            for (let d of fromEnum(a.ab.u)) {
                switch (d.a.e(a.d)) {
                    case "type":
                        b = XmlNamespaceDefinitionBase.b(ST_SlicerStyleType_$type, d.d);
                        break;
                    case "dxfId":
                        c = toNullable(Number_$type, parseUInt32_1(d.d, CultureInfo.invariantCulture));
                        break;
                    default: break;
                }
            }
            ;
            return {
                p1: b,
                p2: c
            };
        }
        static f(a, b, c, d) {
            a.ad.p(b, null);
            let e = null;
            let f = null;
            if (c.hasValue) {
                f = "dxfId";
                e = c.value.toString();
                a.ad.h(f, e);
            }
            f = "type";
            e = XmlNamespaceDefinitionBase.p(ST_SlicerStyleType_$type, d);
            a.ad.h(f, e);
            ;
        }
    }
    CT_SlicerStyleElement.$t = markType(CT_SlicerStyleElement, 'CT_SlicerStyleElement');
    return CT_SlicerStyleElement;
})();
