function Controller(){function e(e){i.is("player clicked",e),void 0!==e.source.player&&(i.is("player object",e.source.player),Alloy.createController("playerDetail",{player:e.source.player}).openWin())}function a(){function e(e){var a=_.groupBy(e.people,function(e){return e.position});_.isEmpty(a)?l.teamSquad.add(l.UI.create("Label",{text:"  "+L("AllMatches_NoData"),backgroundGradient:Alloy.CFG.gradients.lightGrey,height:28,width:Ti.UI.FILL})):_.each(u,function(e){var t=_.find(a,function(a,l){return l===e.position});l.teamSquad.add(Alloy.createController("teamSquadPosition",{position:"  "+L(e.lString),players:t}).getView())}),Alloy.Globals.loading.showHide("hide")}function a(){Alloy.Globals.loading.showHide("hide")}var t=Alloy.CFG.feedUrls.teamSquad,r=o.signUrl(t.replace("{{id}}",d.id));n.getData({getUrl:r},e,a)}require("alloy/controllers/BaseController").apply(this,Array.prototype.slice.call(arguments)),this.__controllerPath="teamSquad",arguments[0]?arguments[0].__parentSymbol:null,arguments[0]?arguments[0].$model:null,arguments[0]?arguments[0].__itemTemplate:null;var l=this,t={},r={};l.__views.teamSquad=Ti.UI.createScrollView({layout:"vertical",id:"teamSquad"}),l.__views.teamSquad&&l.addTopLevelView(l.__views.teamSquad),e?l.__views.teamSquad.addEventListener("click",e):r["$.__views.teamSquad!click!playerClicked"]=!0,t.destroy=function(){},_.extend(l,l.__views);var i=require("helpers"),o=require("feedSigner"),n=require("netConnect"),d=arguments[0]||{},u=[{position:"Goalkeeper",lString:"TeamSquad_Goalkeeper"},{position:"Defender",lString:"TeamSquad_Defender"},{position:"Midfielder",lString:"TeamSquad_Midfielder"},{position:"Attacker",lString:"TeamSquad_Attacker"}];a(),r["$.__views.teamSquad!click!playerClicked"]&&l.__views.teamSquad.addEventListener("click",e),_.extend(l,t)}var Alloy=require("alloy"),Backbone=Alloy.Backbone,_=Alloy._;module.exports=Controller;