define(["app"],function(a){"use strict";return a.directive("activitiesDropdownToggle",["$log",function(){var a=function(a,b){var c=null;b.on("click",function(){var a=$(this).find(".badge");a.hasClass("bg-color-red")&&a.removeClass("bg-color-red").text(0),c=$(this).next(".ajax-dropdown"),c.is(":visible")?(c.fadeOut(150),$(this).removeClass("active")):(c.fadeIn(150),$(this).addClass("active"))}),$(document).mouseup(function(a){c&&!c.is(a.target)&&0===c.has(a.target).length&&(c.fadeOut(150),b.removeClass("active"))})};return{restrict:"EA",link:a}}])});