<?php

namespace App\Filament\Student\Pages;

use Filament\Pages\Page;

class MyExams extends Page
{
    protected string $view = 'filament.student.pages.my-exams';

    protected static ?string $navigationLabel = 'Examination';

    protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-clipboard-document-check';

    protected static ?int $navigationSort = 4;

    public function getViewData(): array
    {
        return [
            'attempts' => \App\Models\ExamAttempt::where('user_id', auth()->id())
                ->with(['exam.course'])
                ->latest()
                ->get(),
        ];
    }
}
