@extends('layouts.student')
@section('title', 'Exams')
@section('content')
    <x-page-head title="Exams" subtitle="Exam timetable" />
    <x-panel>@if($exams->isEmpty())<x-empty-state title="No exams scheduled" />@else<div class="table-wrap"><table><thead><tr><th>Subject</th><th>Date</th><th>Time</th><th>Room</th><th>Duration</th></tr></thead><tbody>
        @foreach($exams as $exam)<tr><td>{{ $exam->subject?->name ?? $exam->title }}</td><td>{{ optional($exam->assessment_date)->format('d M Y') }}</td><td>@if($exam->start_time){{ \Illuminate\Support\Str::of($exam->start_time)->substr(0,5) }}@if($exam->end_time)–{{ \Illuminate\Support\Str::of($exam->end_time)->substr(0,5) }}@endif @else — @endif</td><td>{{ $exam->room ?? '—' }}</td><td>{{ $exam->duration_minutes ? $exam->duration_minutes.' min' : '—' }}</td></tr>@endforeach
    </tbody></table></div>{{ $exams->links() }}@endif</x-panel>
@endsection
