
<?php $__env->startSection('content'); ?>
<div class="row">
    

    <div class="col-12">
        <?php if(session('success')): ?>
            <div class="alert alert-success"><?php echo e(session('success')); ?></div>
        <?php endif; ?>
    
        <div class="card mt-3 p-3">
            <div class="d-flex justify-content-between mb-3">
                <h4>Team Members</h4>
                <a href="<?php echo e(route('teams.create')); ?>" class="btn btn-primary">+ Add Member</a>
            </div>
    
            <div class="table-responsive">
                <table class="table table-bordered table-hover align-middle">
                    <thead >
                        <tr>
                            <th>#</th>
                            <th>Image</th>
                            <th>Name</th>
                            <th>Team Category</th>
                            <th>Position</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $teams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $team): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td><?php echo e($index + 1); ?></td>
                                <td>
                                    <?php if($team->image): ?>
                                        <img src="<?php echo e(asset($team->image)); ?>" alt="<?php echo e($team->name); ?>" width="60" class="rounded">
                                    <?php else: ?>
                                        <span class="text-muted">No Image</span>
                                    <?php endif; ?>
                                </td>
                                <td><?php echo e($team->name); ?></td>
                                <td><?php echo e(ucfirst($team->team_type)); ?></td>
                                <td><?php echo e($team->position); ?></td>
                                <td>
                                    <a href="<?php echo e(route('teams.edit', $team->id)); ?>" class="btn btn-sm btn-warning">Edit</a>
    
                                    <form action="<?php echo e(route('teams.destroy', $team->id)); ?>" method="POST" style="display:inline-block;">
                                        <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                        <button class="btn btn-sm btn-danger" onclick="return confirm('Delete this member?')">Delete</button>
                                    </form>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="6" class="text-center">No team members found.</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.admin-dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/pataneye/public_html/resources/views/admin/pages/team/index.blade.php ENDPATH**/ ?>