define(["ember","app"],function(a,b){return b.PhotoViewerController=a.ObjectController.extend({model:{},title:function(){return this.get("dialog.title")||this.get("activePhoto.name")}.property("dialog.title","activePhoto"),multiple:!0,activeIndex:0,activeNumber:function(){return this.get("activeIndex")+1}.property("activeIndex"),photos:[],activePhoto:function(){return this.get("photos").objectAt(this.get("activeIndex"))}.property("photos","activeIndex"),onReload:function(){this.setProperties({photos:this.get("dialog.photos")||[this.get("dialog.photo")],activeIndex:this.get("dialog.photos").indexOf(this.get("dialog.photo")),multiple:this.get("dialog.photos")&&0!=this.get("dialog.photos.length")})}.observes("dialogid"),preAble:function(){return 2<=this.get("photos.length")&&1<=this.get("activeIndex")}.property("photos","activeIndex"),nextAble:function(){return this.get("photos.length")-1>this.get("activeIndex")}.property("photos","activeIndex"),actions:{accept:function(){},decline:function(a){a.close()},pre:function(){this.get("preAble")&&this.decrementProperty("activeIndex")},next:function(){this.get("nextAble")&&this.incrementProperty("activeIndex")}}})});