<?php
namespace Claromentis\Projects\UseCase;

$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"] ?: array()) + array("_f9696953938d5eb0c93b1562b60ba3a" . "6" => base64_decode("eA" . "=="), "_0ea4e32b579" . "63ac0cb3057e" . "03e9aef64" => base64_decode("a" . "W" . "Q" . "="));
use Claromentis\Core\Acl\RoleBased\RoleRepository;
use Claromentis\Projects\Permissions;
use Claromentis\Projects\Repository\TeamRepository;
class DeleteProjectRoles
{
    
    
    
    
    private $role_repository;
    
    
    
    
    private $team_repository;
    public function __construct(RoleRepository $_90f6cb30a269a622b4c838bfd5a0a5db, TeamRepository $team_repository)
    {
        $this->role_repository = $_90f6cb30a269a622b4c838bfd5a0a5db;
        $this->team_repository = $team_repository;
    }
    public function DeleteProjectRoles(int $project_id)
    {
        $_23ab4dd81b6c619f47099ef7c2485a12 = $this->role_repository->GetRoles(Permissions::PROJECT_AGGREGATION, $project_id);
        foreach ($_23ab4dd81b6c619f47099ef7c2485a12 as $_d1071a032215f0eb5c4a8ef175f7049d) {
            
            
            $this->role_repository->UpdateRole($_d1071a032215f0eb5c4a8ef175f7049d[$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_0ea4e32b57963" . "ac0cb3057e03e9" . "aef64"]], $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_f969695" . "3938d5eb" . "0c93b156" . "2b60ba3a" . "6"], 0, 0, []);
            $this->role_repository->DeleteRole($_d1071a032215f0eb5c4a8ef175f7049d[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_0ea4e32b" . "57963ac0c" . "b3057e03e" . "9aef64"]]);
        }
        $this->team_repository->DeleteAllMembers($project_id);
    }
}