/*
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, typeCast, EnumUtil, markType } from "./type";
import { CodeGenerationLibraryItemPlatform_$type } from "./CodeGenerationLibraryItemPlatform";
import { JsonDictionaryObject } from "./JsonDictionaryObject";
import { JsonDictionaryValue } from "./JsonDictionaryValue";
/**
 * @hidden
 */
export let CodeGenerationLibraryItemContent = /*@__PURE__*/ (() => {
    class CodeGenerationLibraryItemContent extends Base {
        constructor() {
            super(...arguments);
            this._platform = 0;
            this._content = null;
            this._isJson = false;
        }
        get platform() {
            return this._platform;
        }
        set platform(a) {
            this._platform = a;
        }
        get content() {
            return this._content;
        }
        set content(a) {
            this._content = a;
        }
        get isJson() {
            return this._isJson;
        }
        set isJson(a) {
            this._isJson = a;
        }
        static a(a) {
            let b = new CodeGenerationLibraryItemContent();
            if (typeCast(JsonDictionaryObject.$, a) !== null) {
                let c = a;
                if (c.g("platform")) {
                    let d = c.item("platform");
                    b.platform = CodeGenerationLibraryItemContent.b(d);
                }
                if (c.g("content")) {
                    let e = c.item("content");
                    b.content = e.value;
                }
                if (c.g("isJson")) {
                    let f = c.item("isJson");
                    b.isJson = f.value;
                }
            }
            return b;
        }
        d() {
            let a = new JsonDictionaryObject();
            a.item("platform", ((() => {
                let $ret = new JsonDictionaryValue();
                $ret.e = 2;
                $ret.value = EnumUtil.getName(CodeGenerationLibraryItemPlatform_$type, this.platform);
                return $ret;
            })()));
            a.item("content", ((() => {
                let $ret = new JsonDictionaryValue();
                $ret.e = 2;
                $ret.value = this.content;
                return $ret;
            })()));
            a.item("isJson", ((() => {
                let $ret = new JsonDictionaryValue();
                $ret.e = 1;
                $ret.value = this.isJson;
                return $ret;
            })()));
            return a;
        }
        static b(a) {
            let b = a.value;
            let c;
            if (((() => { let d = EnumUtil.tryParse$1(CodeGenerationLibraryItemPlatform_$type, b, true, c); c = d.p2; return d.ret; })())) {
                return c;
            }
            return 12;
        }
    }
    CodeGenerationLibraryItemContent.$t = markType(CodeGenerationLibraryItemContent, 'CodeGenerationLibraryItemContent');
    return CodeGenerationLibraryItemContent;
})();
