public function createRouter(App $app, array $config = []): Router
    {
        $routes = $this->mergeRoutes($app, $this->buildRoutes($config));
        
        return new PathRouter(...$this->generateRouterData($routes));
    }