text: define(["require","backbone","underscore"],function(e){"use strict";var s=e("backbone"),t=e("underscore");return s.View.extend({events:{click:"select",mouseover:"mouseover",mouseout:"mouseout"},constructor:function(e){if(!e||!e.template)throw new Error("Option should have defined template");if(!(e.model&&e.model instanceof s.Model))throw new Error("Option should have associated Backbone.Model");this.template=t.template(e.template),this.disabledClass=e.disabledClass,this.hiddenClass=e.hiddenClass,this.toggleClass=e.toggleClass,s.View.apply(this,arguments)},initialize:function(){s.View.prototype.initialize.apply(this,arguments),this.model.get("disabled")===!0&&this.disable(),this.model.get("hidden")===!0&&this.hide()},el:function(){return this.template(this.model.toJSON())},enable:function(){this.$el.removeAttr("disabled").removeClass(this.disabledClass)},disable:function(){this.$el.attr("disabled","disabled").addClass(this.disabledClass)},show:function(){this.$el.show().removeClass(this.hiddenClass)},hide:function(){this.$el.hide().addClass(this.hiddenClass)},isVisible:function(){return this.$el.is(":visible")},isDisabled:function(){return this.$el.is(":disabled")},select:function(e){this.model.trigger("select",this,this.model,e)},addSelection:function(){this.$el.addClass(this.toggleClass)},removeSelection:function(){this.$el.removeClass(this.toggleClass)},mouseover:function(e){this.trigger("mouseover",this,this.model,e)},mouseout:function(e){this.trigger("mouseout",this,this.model,e)}})});