var _MOBRO_ = {
	mogrtSeq: function(importSettings, jsxbinToExecute) {
		if ((importSettings.ext === ".jsx" || importSettings.ext === ".jsxbin") &&
			importSettings.item_name.toLowerCase().indexOf("delete unused") === -1) {
			$.evalFile(importSettings.file_path);
		}

		var files = new Folder(importSettings.assetsFolder).getFiles();

		for (var i = 0; i < files.length; i++) {
			if (files[i].displayName !== "main.jsxbin" && files[i].displayName !== "main.jsx") {
				continue;
			}

			var script;

			if (jsxbinToExecute && jsxbinToExecute.jsx) {
				script = eval(jsxbinToExecute.jsx);
			} else {
				script = $.evalFile(files[i]);
			}

			if (script instanceof Object) {
				var result = script.main(importSettings);
				if (typeof result === "string" || result instanceof String) {
					return result;
				} else {
					return "success";
				}
			} else if (typeof script === "string" || script instanceof String) {
				return script;
			} else {
				return "success";
			}
		}

		var extensionFolder = new File(importSettings.extensionRoot);
		var assetsFolder = new Folder(extensionFolder.fsName + "/assets");
		var freeMain = new File(assetsFolder.fsName + "/pp.jsxbin");
		var script = $.evalFile(freeMain);
		var result = script.main(importSettings);
		
		return (typeof result === "string" || result instanceof String) ? result : "success";
		
	}
};

$._MOBRO_ = _MOBRO_;
