<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Services\Admin\AdminDashboardService;
use Inertia\Inertia;
use Inertia\Response;

// ══════════════════════════════════════════════════════════════════
//  InPractice — Admin\DashboardController
//  Location: app/Http/Controllers/Admin/DashboardController.php
//
//  Thin controller — Project Bible compliant.
//  receive → call service → return response. Zero logic here.
// ══════════════════════════════════════════════════════════════════

class DashboardController extends Controller
{
    public function __construct(
        private readonly AdminDashboardService $dashboardService
    ) {}

    /**
     * Show the admin dashboard with platform stats.
     * GET /admin/dashboard
     */
    public function index(): Response
    {
        return Inertia::render('Admin/Dashboard', $this->dashboardService->getData());
    }
}
