/* Copyright 2009 Palm, Inc.  All rights reserved. */

function AppAssistant(appController) {
  	this.appController = appController;
}

AppAssistant.prototype.stageName = "ImportAssistantApp";

function StageAssistant(stageController) {
	
}

AppAssistant.prototype.handleLaunch = function(params){
	var args = params;
	if (args) {
		if(args.doneTransfer || args.errorCode) {
			DataImportUtil.getDataTransferReport();
		} 
		return;
	}	
	DataImportUtil.getLocalAccount();
}	

AppAssistant.prototype.handleCommand = function(event) {
	if (event.type == Mojo.Event.commandEnable) {
		if (event.command == Mojo.Menu.helpCmd) {
			event.stopPropagation();
		}
    }
	if (event.type == Mojo.Event.command) {
		if (event.command === Mojo.Menu.helpCmd) {
			AppAssistant.dataImportService.launchHelp();
			event.stop();
		}
	}
}

AppAssistant.dataImportService = new DataImportService();
