(()=>{function e(n,o,e){var t=this;_.assign(t,{remove:function(e){o.removeAfterConfirmation(e).then(function(){t.onRemove({role:e})})},duplicate:o.duplicate,edit:o.edit,isUndeletable:o.isUndeletable,getRoleName:e.getName,$onInit:function(){o.canCreate().then(function(e){t.canCreate=e})}}),n.loadNext=function(){t.onLoadNext()},n.$watch("vm.roles.paging",function(e){t.roles&&(t.roles=t.roles.sort(function(e,n){return e.name.localeCompare(n.name,void 0,{numeric:!0})})),n.paging=e,_.forEach(t.roles,function(e){e.name=e.name&&_.trim(e.name),e.description=e.description&&_.trim(e.description)})})}e.$inject=["$scope","c8yRolesUi","c8yPropertyValueTransformService"],angular.module("c8y.roles").component("c8yRolesList",{templateUrl:":::PLUGIN_PATH:::/list/rolesList.html",bindings:{tabName:"<",roles:"<",addRole:"&",onRemove:"&",helpText:"<",onLoadNext:"&"},controllerAs:"vm",controller:e})})();