<div class="d-flex justify-content-center align-items-start flex-wrap gap-1 all-players-box">
    <?php
        $lockedChampions = [];
        $championArr = [];

        if ($teamData) {
            foreach (['red_team', 'blue_team'] as $teamT) {
                foreach ($teamData[$teamT] as $key => $championId) {
                    if (!empty($championId)) {
                        $championArr[$key] = $championId;
                        $lockedChampions[] = $championId;
                    }
                }
            }
        }
    ?>

    <?php $__currentLoopData = $champions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $champion): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php
            $championId = $champion->id;
            $isLocked = in_array($championId, $lockedChampions);
            $class = array_search($championId, $championArr) ?: '';

            $redImportTeam = json_decode($team['red_import'], true) ?? [];
            $blueImportTeam = json_decode($team['blue_import'], true) ?? [];

            $isImported = '';
            if ($team && !$isLocked) {
                if (in_array($championId, $redImportTeam)) {
                    $isImported = 'red_import';
                }
                if (in_array($championId, $blueImportTeam)) {
                    $isImported = $isImported ? 'red_import blue_import' : 'blue_import';
                }
                $isLocked = ($isImported !== '');
            }
        ?>
        <div class="players-img <?php echo e($class); ?> <?php echo e($isLocked ? 'lock' : ''); ?> <?php echo e($isImported); ?>"
             data-name="<?php echo e($champion->name); ?>" data-id="<?php echo e($champion->id); ?>" id="players-img-<?php echo e($champion->id); ?>"
             data-top="<?php echo e($champion->top); ?>" data-jungle="<?php echo e($champion->jungle); ?>" data-middle="<?php echo e($champion->middle); ?>" data-bottom="<?php echo e($champion->bottom); ?>" data-utility="<?php echo e($champion->utility); ?>">
            <img src="<?php echo e(asset('assets/images/champion/'.$champion->image)); ?>" alt="<?php echo e($champion->name); ?>" data-splash="<?php echo e(asset('assets/images/splash/'.$champion->image_name.'_0.jpg')); ?>"  data-tiles="<?php echo e(asset('assets/images/tiles/'.$champion->image_name.'_0.jpg')); ?>">
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<?php /**PATH /var/www/vhosts/appdeft.in/apexjonathan.appdeft.in/resources/views/panel/champions.blade.php ENDPATH**/ ?>