<?php

namespace App\Http\Controllers;

use App\ViewModels\DashboardPresenter;
use Illuminate\Http\Request;
use Illuminate\View\View;

class DashboardController extends Controller
{
    public function __construct(
        private DashboardPresenter $presenter,
    ) {}

    public function index(Request $request): View
    {
        $dashboard = $this->presenter->present(useMock: false);

        return view('pages.dashboard.index', [
            'dashboard' => $dashboard,
            'featuredTournament' => $dashboard['featuredTournament'],
        ]);
    }
}
