<?php
declare(strict_types=1);

namespace App\Modules\PublicArea;

use App\Core\Auth;
use App\Core\Request;
use App\Core\View;

final class HomeController
{
    public function index(Request $request): string
    {
        if (Auth::check()) {
            return View::renderTemplate('public/home', [
                'user' => Auth::user(),
            ]);
        }

        return View::renderTemplate('public/home', [
            'user' => null,
        ]);
    }
}
