
<div class="card mb-4">
    <div class="card-header d-flex justify-content-between align-items-center flex-wrap gap-2">
        <h5 class="card-title mb-0"><i class="ri-trophy-line me-1"></i><?php echo e(__('Tournament Bracket')); ?></h5>
        <div class="d-flex gap-2">
            <a href="<?php echo e(route('admin.championships.matches.builder', $championship->id)); ?>"
               class="btn btn-sm btn-primary">
                <i class="ri-drag-drop-line me-1"></i><?php echo e(__('Matches Builder')); ?>

            </a>
            <button type="button" class="btn btn-sm btn-success" data-bs-toggle="modal" data-bs-target="#addMatchModal">
                <i class="ri-add-line"></i> <?php echo e(__('Add Match')); ?>

            </button>
        </div>
    </div>
    <div class="card-body">
        <?php if($championship->matches->isEmpty()): ?>
            <div class="text-center py-5 text-muted">
                <i class="ri-trophy-line fs-1 d-block mb-2"></i>
                <?php echo e(__('No matches created yet. Click "Add Match" to start building the bracket.')); ?>

            </div>
        <?php else: ?>
            <div class="bracket-container">
                <div class="bracket-wrapper">
                    <?php $__currentLoopData = $bracketData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stageValue => $matches): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="bracket-round">
                            <div class="bracket-round-title">
                                <?php echo e(\App\Enums\ChampionshipMatchStageEnum::label($stageValue)); ?>

                            </div>
                            <?php $__currentLoopData = $matches; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $match): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php echo $__env->make('admin.championships.show.partials.match-box', ['match' => $match], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        <?php endif; ?>
    </div>
</div>
<?php /**PATH /home/takwgzfj/montsportscamp.com/resources/views/admin/championships/show/partials/bracket.blade.php ENDPATH**/ ?>