<?php
namespace Modules\Additional\Specifique\Client77;

use Helpers\Parametres\Parametres;
use Modules\Additional\Specifique\Client77\Modules\Panier\Controller\DemandeDelaisController;
use Skeleton\Router;
use Skeleton\Module;
use Psr\Container\ContainerInterface;
use Skeleton\Renderer\RendererInterface;

class Specifique77Module extends Module
{

    const DEFINITIONS = __DIR__ . '/config.php';



    // private $router, $container
    public function __construct(ContainerInterface $container)
    {
        $router = $container->get(Router::class);
        $container->get(RendererInterface::class)->addPath('Specifique77', __DIR__);

        $parametres = new Parametres();
        $global = $parametres->expression_global;

        $base_url = $container->get('baseUrl') . $container->get('Specifique77.prefix');

        $router->get($container->get('baseUrl') . $container->get('Specifique77.prefix') . '/Panier/DemandeDelais', DemandeDelaisController::class, 'Specifique77.Panier.demandeDelais');
        $router->get($container->get('baseUrl') . $container->get('Specifique77.prefix') . '/Panier/loadDemandeDelais/{idPanier:'.$global.'+}', DemandeDelaisController::class, 'Specifique77.Panier.loadDemandeDelais');
    }
}
