angular.module("c8y.users").component("c8yUserRemovalModal",{templateUrl:":::PLUGIN_PATH:::/userRemovalModal/userRemovalModal.component.html",bindings:{close:"&",dismiss:"&",resolve:"<"},controller:function(){var s=this;_.assign(s,{$onInit:function(){s.user=s.resolve.user,s.hasSubusers=0<s.user.subusersCount,s.subusersAction=s.hasSubusers?"newOwner":null},confirm:function(){var e={};switch(s.subusersAction){case"newOwner":e.newOwner=s.newOwner;break;case"removeOwner":e.newOwner=null;break;case"deleteAll":e.deleteAll=!0}return s.close({$value:e})},canConfirm:function(){return!s.hasSubusers||s.subusersAction&&("newOwner"!==s.subusersAction||s.newOwner)}})},controllerAs:"vm"});