define(["angular","cjt/util/locale","uiBootstrap","cjt/directives/actionButtonDirective"],(function(e,r){var t;try{(t=e.module("App")).value("PAGE",CPANEL.PAGE),t.value("LOCALE",r)}catch(r){t=e.module("App",[])}return ExternalAuthController.$inject=["$scope","PAGE","LOCALE","ExternalAuthService","growl"],t.controller("ExternalAuthController",ExternalAuthController)}));var ExternalAuthController=function(e,r,t,n,o){e.loaded=!1;var u=this;return u.PAGE=r,u.LOCALE=t,u.remove_link=function(e,r){return n.unlink_provider(e.subject_unique_identifier,e.provider_id).then((function(){return n.get_authn_links().then((function(n){u.PAGE.configured_providers=n.data,o.success(t.maketext("Successfully unlinked the “[_1]” account “[_2]”",r,e.preferred_username))}),(function(e){o.error(t.maketext("The system encountered an error while it tried to retrieve results, please refresh the interface: [_1]",e))}))}),(function(e){o.error(e)}))},e.loaded=!0,u};