function Controller(){function e(e){s.is("blog e",e),Alloy.createController("blogDetail",{id:e.source.itemId}).openWin()}function l(e){var l=e.liveUpdates;s.is("blog",l),_.isEmpty(l)||(void 0!==g.titleText&&i.blogItems.add(i.UI.create("Label",{text:"   "+g.titleText,classes:["header","bold"]})),_.each(l,function(e){s.is("blog item",e);var l=Alloy.createController("blogItem",{id:e.itemId,image:e.imageUrl.medium,title:e.title}).getView();i.blogItems.add(l)}),_.defer(function(){Alloy.Globals.loading.showHide("hide")}))}function t(){Alloy.Globals.loading.showHide("hide")}function o(){var e=void 0!==g.feedUrl?g.feedUrl:Alloy.CFG.feedUrls.blog;if(0!==i.blogItems.children.length){var o=i.blogItems.children.slice(0);_.each(o,function(e){i.blogItems.remove(e),e.destroy&&e.destroy()})}var r=a.signUrl(e.replace("{{count}}",c));d.getData({getUrl:r},l,t)}require("alloy/controllers/BaseController").apply(this,Array.prototype.slice.call(arguments)),this.__controllerPath="blogItems",arguments[0]?arguments[0].__parentSymbol:null,arguments[0]?arguments[0].$model:null,arguments[0]?arguments[0].__itemTemplate:null;var i=this,r={},n={};i.__views.blogItems=Ti.UI.createView({layout:"vertical",height:Ti.UI.SIZE,id:"blogItems"}),i.__views.blogItems&&i.addTopLevelView(i.__views.blogItems),e?i.__views.blogItems.addEventListener("click",e):n["$.__views.blogItems!click!blogClicked"]=!0,r.destroy=function(){},_.extend(i,i.__views);var s=require("helpers"),a=require("feedSigner"),d=require("netConnect"),g=arguments[0]||{},c=void 0!==g.itemCount?g.itemCount:"30";o(),r.getBlog=o,n["$.__views.blogItems!click!blogClicked"]&&i.__views.blogItems.addEventListener("click",e),_.extend(i,r)}var Alloy=require("alloy"),Backbone=Alloy.Backbone,_=Alloy._;module.exports=Controller;