<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Services\System\SystemHealthCheckService;
use Illuminate\View\View;

class SystemHealthController extends Controller
{
    public function __invoke(SystemHealthCheckService $health): View
    {
        $page_title = 'Kurulum Kontrolü';
        $page_description = 'DW Ads Reporter sistem sağlığı, migration, cron, mail ve API kontrol ekranı';
        $groups = $health->groupedChecks();
        $summary = $health->summary();

        return view('admin.system.health', compact('page_title', 'page_description', 'groups', 'summary'));
    }
}
