var app = angular.module('sn.$sp');

app.config(
    function($provide) {
		$provide.decorator('spNotificationsDirective', function($delegate) {
			var directive = $delegate[0];
			
			
			directive.template = '<div id="uiNotificationContainer" role="status">\
<div ng-repeat="m in c.notifications track by $index"\
class="alert" ng-class="{\'alert-danger\': m.type == \'error\', \'alert-warning\': m.type == \'warning\', \'alert-success\': m.type != \'warning\' && m.type != \'error\' }">\
<span ng-if="m.type == \'error\'" class="fa m-r-xs fa-exclamation-circle"></span>\
<span ng-if="m.type == \'warning\'" class="fa m-r-xs fa-exclamation-triangle"></span>\
<span ng-if="m.type != \'warning\' && m.type != \'error\'" class="fa m-r-xs fa-check"></span>\
<span ng-bind-html="::m.message"></span>\
<button ng-if="::$first" class="btn btn-link fa fa-close dismiss-notifications" ng-click="::c.dismissNotifications()" aria-label="Close Notification"></button>\
</div>\
</div>';
			
        return $delegate;
    });
});