function Controller(){function e(){function e(e){l.is("team info",e),a.teamFormWrapper.add(Alloy.createController("matchDetailTeamForm",{team:d.data.teams.home.name,results:e.teamInfo[0].lastMatches.split(","),align:"left"}).getView()),_.defer(function(){a.teamFormWrapper.add(Alloy.createController("matchDetailTeamForm",{team:d.data.teams.away.name,results:e.teamInfo[1].lastMatches.split(","),align:"right"}).getView())})}function t(){}var i=r.signUrl(Alloy.CFG.feedUrls.teamInfo.replace("{{id}}",d.data.teams.home.teamId+","+d.data.teams.away.teamId));n.getData({getUrl:i},e,t)}function t(e){function t(e){l.is("match preview",e),a.matchDetailBuildUp.add(a.UI.create("Label",{text:"   "+L("Matchdetail_Preview"),classes:["header","bold"]})),a.matchDetailBuildUp.add(a.UI.create("ImageView",{image:e.news.imageUrl.medium,width:Ti.UI.FILL})),a.matchDetailBuildUp.add(a.UI.create("Label",{text:e.news.titleLong,classes:["bold","headline"]})),a.matchDetailBuildUp.add(a.UI.create("Label",{html:e.news.article,classes:["small","article"]}))}function i(){}var o=r.signUrl(Alloy.CFG.feedUrls.newsItem.replace("{{id}}",e));n.getData({getUrl:o},t,i)}require("alloy/controllers/BaseController").apply(this,Array.prototype.slice.call(arguments)),this.__controllerPath="matchDetailBuildUp",arguments[0]?arguments[0].__parentSymbol:null,arguments[0]?arguments[0].$model:null,arguments[0]?arguments[0].__itemTemplate:null;var a=this,i={};a.__views.matchDetailBuildUp=Ti.UI.createScrollView({layout:"vertical",contentWidth:Ti.UI.FILL,id:"matchDetailBuildUp"}),a.__views.matchDetailBuildUp&&a.addTopLevelView(a.__views.matchDetailBuildUp),a.__views.keyDate=Ti.UI.createLabel({font:{fontSize:13,fontFamily:Alloy.CFG.fonts.default},width:Ti.UI.FILL,height:36,text:"",id:"keyDate"}),a.__views.matchDetailBuildUp.add(a.__views.keyDate),a.__views.valueDate=Ti.UI.createLabel({font:{fontSize:13,fontFamily:Alloy.CFG.fonts.bold},width:200,right:12,textAlign:"right",id:"valueDate"}),a.__views.keyDate.add(a.__views.valueDate),a.__views.keyCompetition=Ti.UI.createLabel({font:{fontSize:13,fontFamily:Alloy.CFG.fonts.default},width:Ti.UI.FILL,height:36,text:"",id:"keyCompetition"}),a.__views.matchDetailBuildUp.add(a.__views.keyCompetition),a.__views.valueCompetition=Ti.UI.createLabel({font:{fontSize:13,fontFamily:Alloy.CFG.fonts.bold},width:200,right:12,textAlign:"right",id:"valueCompetition"}),a.__views.keyCompetition.add(a.__views.valueCompetition),a.__views.keyVenue=Ti.UI.createLabel({font:{fontSize:13,fontFamily:Alloy.CFG.fonts.default},width:Ti.UI.FILL,height:36,text:"",id:"keyVenue"}),a.__views.matchDetailBuildUp.add(a.__views.keyVenue),a.__views.valueVenue=Ti.UI.createLabel({font:{fontSize:13,fontFamily:Alloy.CFG.fonts.bold},width:200,right:12,textAlign:"right",id:"valueVenue"}),a.__views.keyVenue.add(a.__views.valueVenue),a.__views.keyReferee=Ti.UI.createLabel({font:{fontSize:13,fontFamily:Alloy.CFG.fonts.default},width:Ti.UI.FILL,height:36,text:"",id:"keyReferee"}),a.__views.matchDetailBuildUp.add(a.__views.keyReferee),a.__views.valueReferee=Ti.UI.createLabel({font:{fontSize:13,fontFamily:Alloy.CFG.fonts.bold},width:200,right:12,textAlign:"right",id:"valueReferee"}),a.__views.keyReferee.add(a.__views.valueReferee),a.__views.headerTeamForm=Ti.UI.createLabel({font:{fontSize:16,fontFamily:Alloy.CFG.fonts.bold},backgroundGradient:Alloy.CFG.gradients.lightGrey,width:Ti.UI.FILL,height:28,top:1,id:"headerTeamForm"}),a.__views.matchDetailBuildUp.add(a.__views.headerTeamForm),a.__views.teamFormWrapper=Ti.UI.createView({height:60,id:"teamFormWrapper"}),a.__views.matchDetailBuildUp.add(a.__views.teamFormWrapper),i.destroy=function(){},_.extend(a,a.__views);var l=require("helpers"),o=require("alloy/moment"),r=require("feedSigner"),n=require("netConnect"),d=arguments[0]||{};if(a.keyDate.text="   "+L("Matchdetail_Date"),a.keyCompetition.text="   "+L("Matchdetail_Competition"),a.keyVenue.text="   "+L("Matchdetail_Venue"),a.keyReferee.text="   "+L("Matchdetail_Referee"),a.valueDate.text=o.unix(d.data.kickoff).format("HH:mm - dddd MMMM Do"),a.valueCompetition.text=d.competition,a.valueVenue.text=d.data.venue.venueName,a.valueReferee.text=null!==d.data.referee.lastname?d.data.referee.firstname+" "+d.data.referee.lastname:"",a.headerTeamForm.text="   "+L("Matchdetail_TeamForm"),_.defer(e),d.data.tags.length>0){var m=_.find(d.data.tags,function(e){return"Match Preview"===e.subtype});void 0!==m&&(t(m.entityId),l.i("match preview article id: "+m.entityId))}_.extend(a,i)}var Alloy=require("alloy"),Backbone=Alloy.Backbone,_=Alloy._;module.exports=Controller;