<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\NotificationController;
use App\Http\Controllers\MenuVisibilityController;

Route::get('/', function () {
    return redirect()->route('filament.admin.pages.dashboard');
});

// 包含API路由
require __DIR__.'/api.php';
Route::get('/test-math', function() { return view('test-math'); });
Route::get('/test-case', function() { return view('test-case'); });
Route::view('/knowledge-mindmap-public', 'public.knowledge-mindmap');
Route::get('/admin/intelligent-exam/pdf/{paper_id}', [\App\Http\Controllers\ExamPdfController::class, 'show'])->name('filament.admin.auth.intelligent-exam.pdf');
Route::get('/admin/intelligent-exam/grading/{paper_id}', [\App\Http\Controllers\ExamPdfController::class, 'showGrading'])->name('filament.admin.auth.intelligent-exam.grading');
Route::get('/admin/exam-analysis/pdf', [\App\Http\Controllers\ExamAnalysisPdfController::class, 'show'])->name('filament.admin.auth.exam-analysis.pdf');

// 检查通知的路由
Route::get('/admin/question-management/check-notifications', [NotificationController::class, 'checkNotifications']);

// 菜单可见性切换路由
Route::post('/admin/toggle-menu-visibility', [MenuVisibilityController::class, 'toggle'])
    ->name('filament.admin.auth.toggle-menu-visibility');
