define(["angular","cjt/util/locale","app/services/searchIndex","cjt/modules","cjt/directives/actionButtonDirective","cjt/directives/alertList"],(function(e,t){return e.module("cpanel.searchIndex").controller("main",["$scope","searchIndex","alertService","PAGE",function(e,a,n,r){e.reIndexEmail=function(){return n.clear(),a.reIndexEmail().then((function(e){n.add({message:t.maketext("The system has initiated a reindex of your email."),replace:!0,id:"reIndexStatus",type:"success"}),e.messages&&e.messages.forEach((function(e){n.add({message:e,replace:!1,type:"warning"})}))})).catch((function(e){n.add({message:t.maketext("The system encountered an error when it attempted to initiate a reindex of your email: [_1]",e),replace:!0,id:"reIndexStatus",type:"danger"})}))}}])}));