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

use Skeleton\Router;
use Skeleton\Module;
use Psr\Container\ContainerInterface;
use Helpers\Parametres\Parametres;
use Skeleton\Renderer\RendererInterface;
use Modules\Additional\Specifique\Client118\Modules\EtatStatistique\Controller\TableauReportingController;

class Specifique118Module extends Module
{

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

    // private $router, $container
    public function __construct(ContainerInterface $container)
    {
        $parametres     = new Parametres();

        $global         = $parametres->expression_global;
       
        $router = $container->get(Router::class);
        $container->get(RendererInterface::class)->addPath('specifique118', __DIR__.'/Modules/EtatStatistique/view');

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

        // Controller Gestion Facture
        $router->get($base_url. '/reporting/liste/si', TableauReportingController::class, 'Specifique118.TableauReporting.listeSI');
        $router->get($base_url. '/reporting/liste/nature', TableauReportingController::class, 'Specifique118.TableauReporting.listeNature');
        $router->get($base_url. '/reporting/liste/pole', TableauReportingController::class, 'Specifique118.TableauReporting.listePole');
        $router->get($base_url. '/reporting/liste/signataire', TableauReportingController::class, 'Specifique118.TableauReporting.listeSignataire');
        $router->get($base_url. '/reporting/liste/acheteurs', TableauReportingController::class, 'Specifique118.TableauReporting.listeAcheteurs');
        $router->get($base_url. '/reporting/liste/familles', TableauReportingController::class, 'Specifique118.TableauReporting.listeFamilles');
        $router->get($base_url. '/reporting/liste/sousFamilles', TableauReportingController::class, 'Specifique118.TableauReporting.listeSousFamilles');
        $router->get($base_url. '/reporting/liste/fournisseurs', TableauReportingController::class, 'Specifique118.TableauReporting.listeFournisseurs');
        $router->get($base_url. '/reporting/liste/Prestation', TableauReportingController::class, 'Specifique118.TableauReporting.listePrestation');

        $router->get($base_url. '/reporting/CBND[/{action:'.$global.'+}]', TableauReportingController::class, 'Specifique118.TableauReporting.CBND');
        $router->get($base_url. '/reporting/CBDN[/{action:'.$global.'+}]', TableauReportingController::class, 'Specifique118.TableauReporting.CBDN');
        $router->get($base_url. '/reporting/CBNDPA[/{action:'.$global.'+}]', TableauReportingController::class, 'Specifique118.TableauReporting.CBNDPA');
        $router->get($base_url. '/reporting/engagementParDirection[/{action:'.$global.'+}]', TableauReportingController::class, 'Specifique118.TableauReporting.engagementParDirection');
        $router->get($base_url. '/reporting/DDT[/{action:'.$global.'+}]', TableauReportingController::class, 'Specifique118.TableauReporting.DDT');
        $router->get($base_url. '/reporting/consoBDC[/{action:'.$global.'+}]', TableauReportingController::class, 'Specifique118.TableauReporting.consoBDC');
    }
}
