<?php

namespace Openguru\OpenCartFramework\Router;

use Openguru\OpenCartFramework\Application;
use Openguru\OpenCartFramework\Container\Container;
use Openguru\OpenCartFramework\Container\ServiceProvider;

class RouteServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->container->singleton(Router::class, function (Container $container) {
            $routes = Application::getInstance()->getRoutes();

            return new Router($routes);
        });
    }
}
