var nonClientInitialMainContent = new Component("nonClientInitialMainContent");

app.registerComponent(nonClientInitialMainContent);

nonClientInitialMainContent.rolesMapping = {
		//client
		"hasAnyRole('WMD_Clients')" : [
//		                             	"portfolioHLSummary","exchangeRates"
		                             ],
		//RM
		"hasAnyRole('WMD_RTBs','WMD_Super','WMD_RMs','WMD_CSOs','WMD_BADTs')" : [
//		                                                 	"exchangeRates","portfolioHLSummary"
		                                                 ]
};

nonClientInitialMainContent.on("load",function(){
     var self = this;
     app.mainComponent = this;
     
	 var displayDivId = app.mainComponentDivId;
	 this.render("template/nonClientHomepage.html", displayDivId, null).done(function(){
	     var dtdList = [];
	     dtdList.push(app.trigger("call", "announcement","loadTop"));
	     
	     dtdList.push(app.user.role.checkComponents(self.rolesMapping));
	     
	     
	     return $.when.apply(null,dtdList);
	     
	 });

});

