<?php

declare(strict_types=1);

use System\Http\Request;
use System\Http\Response;
use System\Routing\Dispatcher;
use System\Routing\Router;

/** @var \System\Application\Application $app */

$router = $app->container()->make(Router::class);

$request = $app->container()->make(Request::class);

$response = $app->container()->make(Response::class);

$dispatcher = $app->container()->make(Dispatcher::class);

require ROUTES_PATH . '/web.php';

$dispatcher->dispatch(
    $router,
    $request,
    $response
);