function Controller(){function e(){n.toggleMenu(o.matches,Alloy.Globals.animations.menu)}function t(){if(Alloy.Globals.dataValidCompetitions){var e=[];_.each(Alloy.Globals.competitions,function(t){var i=Alloy.createController("filterTableRow",{id:t.competitionId,title:t.competitionName,type:"competition"}).getView();e.push(i)}),o.filterTable.data=e}else setTimeout(t,300)}function i(e){l({competitionId:e.row.competitionId})}function l(){n.i("set active filter")}require("alloy/controllers/BaseController").apply(this,Array.prototype.slice.call(arguments)),this.__controllerPath="matches",arguments[0]?arguments[0].__parentSymbol:null,arguments[0]?arguments[0].$model:null,arguments[0]?arguments[0].__itemTemplate:null;var o=this,a={},r={};o.__views.matches=Ti.UI.createView({backgroundColor:Alloy.CFG.colors.darkBlue,layout:"vertical",id:"matches"}),o.__views.matches&&o.addTopLevelView(o.__views.matches),o.__views.titleBar=Ti.UI.createView({height:40,top:0,id:"titleBar"}),o.__views.matches.add(o.__views.titleBar),o.__views.menuButton=Ti.UI.createView({width:33,height:33,left:12,backgroundImage:"images/iconMenu.png",id:"menuButton"}),o.__views.titleBar.add(o.__views.menuButton),e?o.__views.menuButton.addEventListener("click",e):r["$.__views.menuButton!click!toggleMenu"]=!0,o.__views.title=Ti.UI.createLabel({font:{fontSize:20,fontFamily:Alloy.CFG.fonts.bold},color:Alloy.CFG.colors.white,text:L("Matches_Title"),id:"title"}),o.__views.titleBar.add(o.__views.title),o.__views.contentWrapper=Ti.UI.createView({id:"contentWrapper"}),o.__views.matches.add(o.__views.contentWrapper),o.__views.table=Alloy.createController("matchTable",{id:"table",__parentSymbol:o.__views.contentWrapper}),o.__views.table.setParent(o.__views.contentWrapper),o.__views.filterTable=Ti.UI.createTableView({separatorColor:Alloy.CFG.colors.darkGrey,backgroundColor:"transparent",height:420,top:-420,id:"filterTable"}),o.__views.contentWrapper.add(o.__views.filterTable),i?o.__views.filterTable.addEventListener("click",i):r["$.__views.filterTable!click!filterMenuClicked"]=!0,a.destroy=function(){},_.extend(o,o.__views);var n=require("helpers");t(),r["$.__views.menuButton!click!toggleMenu"]&&o.__views.menuButton.addEventListener("click",e),r["$.__views.filterTable!click!filterMenuClicked"]&&o.__views.filterTable.addEventListener("click",i),_.extend(o,a)}var Alloy=require("alloy"),Backbone=Alloy.Backbone,_=Alloy._;module.exports=Controller;