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

use Skeleton\Router;
use Skeleton\Module;
use Psr\Container\ContainerInterface;
use Skeleton\Renderer\RendererInterface;
use Modules\Additional\Specifique\Client61\Modules\Facture\Controller\AjaxFactureController;

class Specifique61Module 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('Specifique61', __DIR__);

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

        // Controller AjaxFacture
        $router->get($base_url . '/ajax-facture/changeCommande', AjaxFactureController::class, 'Specifique61.ajax.changeCommande');
        $router->get($base_url . '/ajax-facture/changeSousFamille', AjaxFactureController::class, 'Specifique61.ajax.changeSousFamille');
        $router->get($base_url . '/ajax-facture/changeTypeTva', AjaxFactureController::class, 'Specifique61.ajax.changeTypeTva');
    }
}
