<?php
declare(strict_types=1);

namespace App\Modules\Info;

use App\Core\Http\Request;
use App\Core\Http\Response;
use App\Core\View\Template;

final class InfoController
{
    public function __construct(
        private readonly Template $template
    ) {
    }

    public function show(Request $request): Response
    {
        $html = $this->template->render('info/allegro', [
            'title' => 'orderPRO — Informacje o aplikacji',
            'appName' => (string) (getenv('APP_NAME') ?: 'orderPRO'),
            'appVersion' => (string) (getenv('APP_VERSION') ?: '1.0.0'),
        ], 'layouts/public');

        return Response::html($html);
    }
}
