<?php
/// file: app/Controllers/ErrorController.php

declare(strict_types=1);

namespace App\Controllers;

use App\Core\Controller;
use App\Core\Request;
use App\Core\Response;

final class ErrorController extends Controller
{
    public function notFound(Request $request): Response
    {
        $html = $this->view('errors/404', [
            'meta' => \App\Helpers\Seo::page('404', [
                'title' => 'Lost signal — ' . $this->app->config('app.name'),
                'description' => 'This path does not resolve. Return to the main channel.',
            ]),
        ], 'layouts/base');
        return Response::html($html, 404);
    }
}
