<?php
use App\Models\ReportQuarter;
use App\Models\ActivitVieScolaire;
use Livewire\Component;
?>

<div>
    <div class="table-responsive">
        <table class="table table-bordered" style="width: 100%">
            <thead>
                <tr>
                    <th class="text-center" style="padding: 8px">N°</th>
                    <th style="padding: 8px">Infirmerie</th>
                    <th style="padding: 8px">Bibliothèque</th>
                    <th style="padding: 8px">Cantine</th>
                    <th style="padding: 8px">Activités des clubs et associations</th>
                    <th style="padding: 8px">Activités coopératives</th>
                    <th style="padding: 8px">Projet d’établissement</th>
                </tr>
            </thead>
            <tbody>
                @php $i = 1; @endphp
                @forelse ($data as $item)
                    <tr>
                        <th class="text-center" style="padding: 8px">{{ $i < 10 ? '0'.$i++:$i++ }}</th>
                        <td style="padding: 8px">
                            {{ ucfirst($item->infirmerie) }}
                        </td>
                        <td style="padding: 8px">
                            {{ ucfirst($item->bibliothek) }}
                        </td>
                        <td style="padding: 8px">
                            {{ ucfirst($item->cantin) }}
                        </td>
                        <td style="padding: 8px">
                            {{ ucfirst($item->activits) }}
                        </td>
                        <td style="padding: 8px">
                            {{ ucfirst($item->cooperativ) }}
                        </td>
                        <td style="padding: 8px">
                            {{ ucfirst($item->projet) }}
                        </td>
                    </tr> 
                @empty
                    <tr>
                        <td colspan="7" class="text-center" style="padding: 8px">Underdefined data</td>
                    </tr>
                @endforelse
            </tbody>
        </table>
    </div>
</div>