define(["jquery","underscore","cilantro/define/conceptmanager"],function(a,b,c){var d=b.template('<div class="condition clearfix"><a href="#" class="remove"></a><%= condition %></div>'),e=a("#condition-list");e.bind("activate-criterion",function(b,d,f){e.children().removeClass("selected"),f.addClass("selected"),a.get(App.endpoints.criteria+d,function(a){c.show(a.viewset,f.data("constraint"))})});var f=function(b,c,e){var f=a(d(e));return f.data("constraint",b),f.find(".remove").click(function(){return App.hub.publish("CriteriaRemovedEvent",f),!1}),f.click(function(a){return App.hub.publish("concept/request",b.concept_id),f.trigger("activate-criterion",[b.concept_id,f]),!1}),f};return{Criteria:f}})