var __hasProp=Object.prototype.hasOwnProperty,__extends=function(a,b){function d(){this.constructor=a}for(var c in b)__hasProp.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},__bind=function(a,b){return function(){return a.apply(b,arguments)}};define(["underscore","cilantro/utils/logging"],function(a,b){var c,d;return d={UnsavedReportTemplate:'<div class="message-block warning">                <div class="content">                    <strong role="name"><%= name %></strong> has unsaved changes                </div>                <button class="revert">Revert</button>                <button class="save">Save</button>            </div>'},c=function(){function c(){c.__super__.constructor.apply(this,arguments)}return __extends(c,b.MessageView),c.prototype.template=a.template(d.UnsavedReportTemplate),c.prototype.elements={"[role=name]":"name"},c.prototype.events={"click .save":"save","click .revert":"revert"},c.prototype.initialize=function(){return this.render(),this.model.bind("change:name",__bind(function(a,b){return this.el.find("[role=name]").text(b)},this)),this.model.bind("change:has_changed",__bind(function(a,b){return b?App.hub.publish("log",this):App.hub.publish("dismiss",this)},this))},c.prototype.render=function(){return this.el=this.$(this.template(this.model.toJSON())),this.setLocalElements(),this.delegateEvents(),this},c.prototype.save=function(){return this.model.push()},c.prototype.revert=function(){return this.model.revert()},c}(),{UnsavedReport:c,templates:d}})