{{-- Time Slot Buttons --}}
@foreach(['06:00:00' => '6am', '09:00:00' => '9am', '12:00:00' => '12pm', '17:00:00' => '5pm'] as $timeVal => $label)
@endforeach
{{-- @php
$days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
@endphp
@foreach ($days as $index => $day)
@php
$date = $dates[$index];
$isSelected = $date == $selectedDay ? 'border-white' : 'border-black';
@endphp
@endforeach --}}
@foreach($dates as $date)
@php
$formatted = $date->format('d/m/Y');
$class = $classesByDate[$formatted] ?? null;
$isToday = $date->isToday();
@endphp
{{ $date->format('l') }}
{{ $formatted }}
@if($class)
{{ $class->spots }} spots available
@php
$userReservation = \App\Models\ReservationSession::where('user_id', Auth::id())
->where('classes_id', $class->id)
->first();
@endphp
@if($userReservation)
{{-- Cancel Button --}}
@else
{{-- Reserve Button --}}
@endif
@else
No class
--
@endif
@endforeach