
registerType('Core.UI', (function () { function MenuItem() {} var __super = setSupertypeFromDomain(MenuItem, 'BasicObject', 'Core');

	Object.defineProperty(MenuItem.prototype, "title", {
	outlet: true, 
	synthesized: true, 
	enumerable: true, get:function () { return this._title; }, set:function (v) {if (!Object.hasOwnProperty(this, "_title")) Object.defineProperty(this, "_title", { writable: true, configurable: true }); this._title = v; }});
	

	Object.defineProperty(MenuItem.prototype, "target", {
	outlet: true, 
	synthesized: true, get:function () { return this._target; }, set:function (v) {if (!Object.hasOwnProperty(this, "_target")) Object.defineProperty(this, "_target", { writable: true, configurable: true }); this._target = v; }});
	

	Object.defineProperty(MenuItem.prototype, "targetMethod", {
	outlet: true, 
	synthesized: true, 
	enumerable: true, get:function () { return this._targetMethod; }, set:function (v) {if (!Object.hasOwnProperty(this, "_targetMethod")) Object.defineProperty(this, "_targetMethod", { writable: true, configurable: true }); this._targetMethod = v; }});
	

	Object.defineProperty(MenuItem.prototype, "action", {
	outlet: true, 
	synthesized: true, get:function () { return this._action; }, set:function (v) {if (!Object.hasOwnProperty(this, "_action")) Object.defineProperty(this, "_action", { writable: true, configurable: true }); this._action = v; }});
	

	Object.defineProperty(MenuItem.prototype, "separator", {
	outlet: true, 
	synthesized: true, 
	enumerable: true, get:function () { return this._separator; }, set:function (v) {if (!Object.hasOwnProperty(this, "_separator")) Object.defineProperty(this, "_separator", { writable: true, configurable: true }); this._separator = v; }});
	

	Object.defineProperty(MenuItem.prototype, "tag", {
	outlet: true, 
	synthesized: true, 
	enumerable: true, get:function () { return this._tag; }, set:function (v) {if (!Object.hasOwnProperty(this, "_tag")) Object.defineProperty(this, "_tag", { writable: true, configurable: true }); this._tag = v; }});
	

	Object.defineProperty(MenuItem.prototype, "enabled", {
	outlet: true, 
	synthesized: true, 
	enumerable: true, get:function () { return this._enabled; }, set:function (v) {if (!Object.hasOwnProperty(this, "_enabled")) Object.defineProperty(this, "_enabled", { writable: true, configurable: true }); this._enabled = v; }});
	

	Object.defineProperty(MenuItem.prototype, "state", {
	outlet: true, 
	synthesized: true, 
	enumerable: true, get:function () { return this._state; }, set:function (v) {if (!Object.hasOwnProperty(this, "_state")) Object.defineProperty(this, "_state", { writable: true, configurable: true }); this._state = v; }});
	
	
	Object.defineProperty(MenuItem.prototype, "indentationLevel", {
	outlet: true, 
	synthesized: true, 
	enumerable: true, get:function () { return this._indentationLevel; }, set:function (v) {if (!Object.hasOwnProperty(this, "_indentationLevel")) Object.defineProperty(this, "_indentationLevel", { writable: true, configurable: true }); this._indentationLevel = v; }});
	

	Object.defineProperty(MenuItem.prototype, "submenu", {
	outlet: true, 
	synthesized: true, 
	enumerable: true, get:function () { return this._submenu; }, set:function (v) {if (!Object.hasOwnProperty(this, "_submenu")) Object.defineProperty(this, "_submenu", { writable: true, configurable: true }); this._submenu = v; }});
	

	Object.defineProperty(MenuItem.prototype, "icon", {
	outlet: true, 
	enumerable: true, get:function () { return this._icon; }, set:function (v) {if (!Object.hasOwnProperty(this, "_icon")) Object.defineProperty(this, "_icon", { writable: true, configurable: true }); this._icon = v; }});
	

MenuItem.prototype.performActionWithEvent = function MenuItem_performActionWithEvent(e) {

		if (typeof this.action === 'function') {
			this.action.call(this.target||this, this, e);
			return;
		}
		
		if (this.target) {
			this.target[this.targetMethod]({}, this, e);
		}

	};
	


MenuItem.prototype.initPropertiesFromData = function MenuItem_initPropertiesFromData(data) {
try { __super.prototype.initPropertiesFromData.call(this, data); } catch (err) {}
if (data.hasOwnProperty("title")) this.title = data.title;
if (data.hasOwnProperty("target")) this.target = data.target;
if (data.hasOwnProperty("targetMethod")) this.targetMethod = data.targetMethod;
if (data.hasOwnProperty("action")) this.action = data.action;
if (data.hasOwnProperty("separator")) this.separator = data.separator;
if (data.hasOwnProperty("tag")) this.tag = data.tag;
if (data.hasOwnProperty("enabled")) this.enabled = data.enabled;
if (data.hasOwnProperty("state")) this.state = data.state;
if (data.hasOwnProperty("indentationLevel")) this.indentationLevel = data.indentationLevel;
if (data.hasOwnProperty("submenu")) this.submenu = data.submenu;
if (data.hasOwnProperty("icon")) this.icon = data.icon;
};

MenuItem.prototype.decodeData = function MenuItem_decodeData(data) { var decoded;
try { decoded = __super.prototype.decodeData.call(this, data); } catch (err) { console.warn(err); decoded = clone(data); }
if (data.hasOwnProperty("submenu")) decoded.submenu = this.context.decodeObjectTree(data.submenu);
return decoded; };

MenuItem.prototype.encode = function MenuItem_encode() { var encoded;
try { encoded = __super.prototype.encode.call(this); } catch (err) { console.warn(err); encoded = this.context.encodeObject(this); }
if (this._submenu && this._submenu.encode) {encoded.submenu = this.submenu.encode();
}return encoded; };

MenuItem.prototype.encodeCloned = function MenuItem_encodeCloned() { var encoded;
try { encoded = __super.prototype.encodeCloned.call(this); } catch (err) { console.warn(err); encoded = {}; }
if (this._submenu && this._submenu.encode) {encoded.submenu = this.submenu.encodeCloned();
}return encoded; };

MenuItem.prototype.expectedTypeForProperty = function MenuItem_expectedTypeForProperty(key) {
	if (key === "title") return "";
	if (key === "target") return "";
	if (key === "targetMethod") return "";
	if (key === "action") return "";
	if (key === "separator") return "";
	if (key === "tag") return "";
	if (key === "enabled") return "";
	if (key === "state") return "Number";
	if (key === "indentationLevel") return "Number";
	if (key === "submenu") return "Menu";
	if (key === "icon") return "String";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return MenuItem; }()));