<?php
namespace Modules\Ajax;

use Skeleton\Router;
use Skeleton\Module;
use Skeleton\Renderer\RendererInterface;
use Psr\Container\ContainerInterface;
use Helpers\Parametres\Parametres;
use Modules\Ajax\Controller\ListeController;
use Modules\Ajax\Controller\ContentController;
use Modules\Ajax\Controller\MailController;
use Modules\Ajax\Controller\ValidatorController;
use Modules\Ajax\Controller\OutilController;
use Modules\Ajax\Controller\FiltreAvanceController;
use Modules\Ajax\Controller\SessionController;
use Modules\Ajax\Controller\ErreurController;
use Modules\Ajax\Controller\TreeviewController;
use Modules\Ajax\Controller\FavorisController;
use Modules\Ajax\Controller\Facture\ExportMasseFacturesController;

class AjaxModule extends Module
{

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

    public function __construct(ContainerInterface $container)
    {
        $container->get(RendererInterface::class)->addPath('ajax-liste', __DIR__ . '/views/liste');
        $container->get(RendererInterface::class)->addPath('ajax-validator', __DIR__ . '/views/validator');
        $container->get(RendererInterface::class)->addPath('popup-erreur', __DIR__ . '/views/Erreur');
        $container->get(RendererInterface::class)->addPath('ajax-detail', __DIR__ . '/views/detail');
        $container->get(RendererInterface::class)->addPath('ajax-content', __DIR__ . '/views/content');
        $container->get(RendererInterface::class)->addPath('ajax-filtre-avance', __DIR__ . '/views/filtre-avance');
        $container->get(RendererInterface::class)->addPath('ajax-layout', __DIR__ . '/../../Template/Ajax');
        $container->get(RendererInterface::class)->addPath('ajax-mail', __DIR__ . '/views/mail');
        $container->get(RendererInterface::class)->addPath('ajax-treeview', __DIR__ . '/views/treeview');
        $container->get(RendererInterface::class)->addPath('outil', __DIR__ . '/views/outil');
        $container->get(RendererInterface::class)->addPath('ajax-notification', __DIR__ . '/views/notification');
        $container->get(RendererInterface::class)->addPath('Ajax', __DIR__ . '/views');
        
        $router = $container->get(Router::class);

        $parametres     = new Parametres();
        $societe        = $parametres->expression_global_espace;
        $num        = $parametres->expression_global_espace;
        $function        = $parametres->expression_global_espace;
        $type        = $parametres->expression_global_espace;
        $expression_underscore        = $parametres->expression_underscore;
        $base_url = $container->get('baseUrl') . $container->get('Ajax.prefix');
        $codeUni = $parametres->getUniversalCodeRegexp();

        // Controller Favoris
        $router->get($base_url . '/ajouterFavoris', FavorisController::class, 'Ajax.Favoris.ajouterFavoris');
        $router->get($base_url . '/supprimerFavoris', FavorisController::class, 'Ajax.Favoris.supprimerFavoris');

        // Controller ListeControler
        
        //UTILISATEUR AUTORISE
        $router->public($base_url . '/liste/societeAutoriseUtilisateur', ListeController::class, 'Ajax.liste.SocieteUtilisateurAutorise');
        $router->public($base_url . '/liste/centreEmetteurAutoriseUtilisateur', ListeController::class, 'Ajax.liste.centreEmetteurUtilisateurAutorise');
        $router->public($base_url . '/liste/centreLivraisonUtilisateur', ListeController::class, 'Ajax.liste.centreLivraisonUtilisateurAutorise');
        $router->public($base_url . '/liste/sectImpuUtilisateur', ListeController::class, 'Ajax.liste.sectionImpuUtilisateurAutorise');
        $router->public($base_url . '/liste/codeComplementaireUtilisateur', ListeController::class, 'Ajax.liste.codeCompUtilisateurAutorise');
        $router->public($base_url . '/liste/sousCompteAnaUtilisateur', ListeController::class, 'Ajax.liste.sousCompteAnaUtilisateurAutorise');
        $router->public($base_url . '/liste/centreAnaUtilisateur', ListeController::class, 'Ajax.liste.centreAnalyseUtilisateurAutorise');
        $router->public($base_url . '/liste/multiSocieteUtilisateur', ListeController::class, 'Ajax.liste.multiSocieteUtilisateurAutorise');
        $router->public($base_url . '/liste/Decoupage', ListeController::class, 'Ajax.liste.decoupage');
        
        $router->public($base_url . '/liste/frsAndGrpFouA', ListeController::class, 'Ajax.liste.frsAndGrpFou');
        $router->public($base_url . '/liste/entity/{entity:' . $expression_underscore . '+}', ListeController::class, 'Ajax.liste.entityList');
        
        $router->public($base_url . '/liste/societeImpression', ListeController::class, 'Ajax.liste.societeImpression');
        $router->public($base_url . '/liste/societeCommune', ListeController::class, 'Ajax.liste.societeCommune');
        $router->public($base_url . '/liste/aoEntet', ListeController::class, 'Ajax.liste.aoEntet');
        $router->public($base_url . '/liste/centreEmetteurImpression', ListeController::class, 'Ajax.liste.centreEmetteurImpression');
        $router->public($base_url . '/liste/centreLivraisonImpression', ListeController::class, 'Ajax.liste.centreLivraisonImpression');
        $router->public($base_url . '/liste/fournisseurImpression', ListeController::class, 'Ajax.liste.fournisseurImpression');
        $router->public($base_url . '/liste/typeDeDocument', ListeController::class, 'Ajax.liste.typeDeDocument');
        $router->public($base_url . '/liste/typeAchatwith', ListeController::class, 'Ajax.liste.typeAchatWith');
        $router->public($base_url . '/liste/typeAchat', ListeController::class, 'Ajax.liste.typeAchat');
        $router->public($base_url . '/liste/typeAchatFournis', ListeController::class, 'Ajax.liste.typeAchatFournis');
        $router->public($base_url . '/liste/typeAchatwithout', ListeController::class, 'Ajax.liste.typeAchatWithout');
        $router->public($base_url . '/liste/typeDeMarche', ListeController::class, 'Ajax.liste.typeDeMarche');
        $router->public($base_url . '/liste/accadre', ListeController::class, 'Ajax.liste.accadre');
        $router->public($base_url . '/liste/cqualite', ListeController::class, 'Ajax.liste.cqualite');
        $router->public($base_url . '/liste/marches', ListeController::class, 'Ajax.liste.marches');
        $router->public($base_url . '/liste/unites', ListeController::class, 'Ajax.liste.unites');
        $router->public($base_url . '/liste/doa', ListeController::class, 'Ajax.liste.doa');
        $router->public($base_url . '/liste/langues', ListeController::class, 'Ajax.liste.langues');
        $router->public($base_url . '/liste/DomaineFonctionnel', ListeController::class, 'Ajax.liste.domaineFonctionnel');
        $router->public($base_url . '/liste/DomaineFonctionnelle', ListeController::class, 'Ajax.liste.domaineFonctionnelle');
        $router->public($base_url . '/liste/fonction', ListeController::class, 'Ajax.liste.fonction');
        $router->public($base_url . '/liste/fonctionUser', ListeController::class, 'Ajax.liste.fonctionUser');
        $router->public($base_url . '/liste/emetteurAll', ListeController::class, 'Ajax.liste.centreEmetteurAll');
        $router->public($base_url . '/liste/centreByType/{typeCentre:' . $expression_underscore . '+}', ListeController::class, 'Ajax.liste.centreByType');
        $router->public($base_url . '/liste/livraisonAll', ListeController::class, 'Ajax.liste.centreLivraisonAll');
        $router->public($base_url . '/liste/clausier', ListeController::class, 'Ajax.liste.clausier');

        $router->public($base_url . '/liste/douanes', ListeController::class, 'Ajax.liste.douanes');
        $router->public($base_url . '/liste/messstan', ListeController::class, 'Ajax.liste.messstan');
        $router->public($base_url . '/liste/societe[/{action:' . $expression_underscore . '+}]', ListeController::class, 'Ajax.liste.societe');
        $router->public($base_url . '/liste/grpSociete', ListeController::class, 'Ajax.liste.grpSociete');
        $router->public($base_url . '/liste/societeHistorique', ListeController::class, 'Ajax.liste.societeHistorique');
        $router->public($base_url . '/liste/condition-de-paiement', ListeController::class, 'Ajax.liste.conditionPaiement');
        $router->public($base_url . '/liste/mode-de-paiement', ListeController::class, 'Ajax.liste.modePaiement');
        $router->public($base_url . '/liste/mode-de-livraison', ListeController::class, 'Ajax.liste.modelivraison');
        $router->public($base_url . '/liste/fournisseur[/{type:'.$type.'+}]', ListeController::class, 'Ajax.liste.fournisseur');
        $router->public($base_url . '/liste/fournisseurSansArticlesSansCommande', ListeController::class, 'Ajax.liste.fournisseurSansArticlesSansCommande');
        $router->public($base_url . '/liste/fournisseurAvecArticlesSansCommande', ListeController::class, 'Ajax.liste.fournisseurAvecArticlesSansCommande');
        $router->public($base_url . '/liste/contactFournisseur', ListeController::class, 'Ajax.liste.contactFournisseur');
        $router->public($base_url . '/liste/contactFournisseurV2', ListeController::class, 'Ajax.liste.contactFournisseurV2');
        $router->public($base_url . '/liste/contactParFournisseur', ListeController::class, 'Ajax.liste.contactParFournisseur');
        $router->public($base_url . '/liste/adresseFournisseur', ListeController::class, 'Ajax.liste.adresseFournisseur');
        $router->public($base_url . '/liste/adresseCentre', ListeController::class, 'Ajax.liste.adresseCentre');
        $router->public($base_url . '/liste/contactParCentre', ListeController::class, 'Ajax.liste.contactParCentre');
        $router->public($base_url . '/liste/domaineCompetence', ListeController::class, 'Ajax.liste.domaineCompetence');
        $router->public($base_url . '/liste/ca-entet', ListeController::class, 'Ajax.liste.caEntet');
        $router->public($base_url . '/liste/devise', ListeController::class, 'Ajax.liste.devise');
        $router->public($base_url . '/liste/ordonance', ListeController::class, 'Ajax.liste.ordonance');
        $router->public($base_url . '/liste/si', ListeController::class, 'Ajax.liste.si');
//         $router->public($base_url . '/liste/codecomp', ListeController::class, 'Ajax.liste.codeComp');
        $router->public($base_url . '/liste/suicadat', ListeController::class, 'Ajax.liste.suiCaDat');
        $router->public($base_url . '/liste/cdc', ListeController::class, 'Ajax.liste.cdc');
        $router->public($base_url . '/liste/sca', ListeController::class, 'Ajax.liste.sca');
        $router->public($base_url . '/liste/centre', ListeController::class, 'Ajax.liste.centre');
        $router->public($base_url . '/liste/centreEmetteur', ListeController::class, 'Ajax.liste.centreEmetteur');
        $router->public($base_url . '/liste/centreLivraison', ListeController::class, 'Ajax.liste.centreLivraison');
        $router->public($base_url . '/liste/Regroupement', ListeController::class, 'Ajax.liste.regroup');
        
        $router->public($base_url . '/liste/periodes', ListeController::class, 'Ajax.liste.periodes');
        $router->public($base_url . '/liste/pays', ListeController::class, 'Ajax.liste.pays');
        $router->public($base_url . '/liste/motClef', ListeController::class, 'Ajax.liste.motClef');
        $router->public($base_url . '/liste/article', ListeController::class, 'Ajax.liste.articles');
        $router->public($base_url . '/liste/articlesFraisPort', ListeController::class, 'Ajax.liste.articlesFraisPort');
        $router->public($base_url . '/liste/articlesSiCdcSca', ListeController::class, 'Ajax.liste.articlesSiCdcSca');
        $router->public($base_url . '/liste/articlesFrsFaSfa', ListeController::class, 'Ajax.liste.articlesFrsFaSfa');
        $router->public($base_url . '/liste/acheteur', ListeController::class, 'Ajax.liste.acheteur');
        $router->public($base_url . '/liste/sousFamille', ListeController::class, 'Ajax.liste.sousFamille');
        $router->public($base_url . '/liste/typeTVA', ListeController::class, 'Ajax.liste.typeTVA');
        $router->public($base_url . '/liste/TVA', ListeController::class, 'Ajax.liste.TVA');
        $router->public($base_url . '/liste/Format', ListeController::class, 'Ajax.liste.Format');
        $router->public($base_url . '/liste/fabricant', ListeController::class, 'Ajax.liste.fabricant');
        $router->public($base_url . '/liste/gamme', ListeController::class, 'Ajax.liste.gamme');
        $router->public($base_url . '/liste/famille', ListeController::class, 'Ajax.liste.famille');
        $router->public($base_url . '/liste/grpfou', ListeController::class, 'Ajax.liste.grpfou');
        $router->public($base_url . '/liste/ssItesto', ListeController::class, 'Ajax.liste.ssItesto');
        $router->public($base_url . '/liste/sitesto', ListeController::class, 'Ajax.liste.sitesto');
        $router->public($base_url . '/liste/typeDoc', ListeController::class, 'Ajax.liste.typeDoc');
        $router->public($base_url . '/liste/dccEntet', ListeController::class, 'Ajax.liste.dccEntet');
        $router->public($base_url . '/liste/commande', ListeController::class, 'Ajax.liste.commande');
        $router->public($base_url . '/liste/commandeModele', ListeController::class, 'Ajax.liste.commandeModele');
        $router->public($base_url . '/liste/br', ListeController::class, 'Ajax.liste.br');
        $router->public($base_url . '/liste/brLigne', ListeController::class, 'Ajax.liste.brLigne');
        $router->public($base_url . '/liste/sscptana', ListeController::class, 'Ajax.liste.sscptana');
        
        $router->public($base_url . '/liste/centrana', ListeController::class, 'Ajax.liste.centrana');
        $router->public($base_url . '/liste/directio', ListeController::class, 'Ajax.liste.directio');
        $router->public($base_url . '/liste/natana', ListeController::class, 'Ajax.liste.natana');
        $router->public($base_url . '/liste/uo', ListeController::class, 'Ajax.liste.uo');
        $router->public($base_url . '/liste/etatStat', ListeController::class, 'Ajax.liste.etatStat');
        $router->public($base_url . '/liste/utilisateursOxalink', ListeController::class, 'Ajax.liste.utilisateursOxalink');
        $router->public($base_url . '/liste/aoFormatExcel', ListeController::class, 'Ajax.liste.aoFormatExcel');
        $router->public($base_url . '/liste/equivArt/{numCleq:[A-Za-z0-9_-]+}/{codeFou:[A-Za-z0-9_-]+}', ListeController::class, 'Ajax.liste.equivArt');
        $router->public($base_url . '/liste/campNotEx', ListeController::class, 'Ajax.liste.campNotEx');
        
        // Signataire
        $router->public($base_url . '/liste/groupeSignataire', ListeController::class, 'Ajax.liste.groupeSignataire');
        $router->public($base_url . '/liste/delegatairePref', ListeController::class, 'Ajax.liste.delegatairePref');
        
        
        $router->public($base_url . '/liste/utilisateur[/{type:[A-Za-z0-9_-]+}]', ListeController::class, 'Ajax.liste.utilisateur');
        $router->public($base_url . '/liste/utilisateurSociete', ListeController::class, 'Ajax.liste.utilisateurSociete');
        $router->public($base_url . '/liste/domfonct', ListeController::class, 'Ajax.liste.domfonct');
        $router->public($base_url . '/liste/acheteurUser', ListeController::class, 'Ajax.liste.acheteurUser');
        $router->public($base_url . '/liste/demandeur', ListeController::class, 'Ajax.liste.demandeur');
        $router->public($base_url . '/liste/sigDa', ListeController::class, 'Ajax.liste.sigDA');
        $router->public($base_url . '/liste/sigCde', ListeController::class, 'Ajax.liste.sigCde');
        $router->public($base_url . '/liste/sigFact', ListeController::class, 'Ajax.liste.sigFact');
        $router->public($base_url . '/liste/sigBAP', ListeController::class, 'Ajax.liste.sigBAP');
        $router->public($base_url . '/liste/tsDon/{typeDico:'.$codeUni.'}[/{societe:'.$societe.'+}]', ListeController::class, 'Ajax.liste.tsDon');
        $router->public($base_url . '/liste/docCat', ListeController::class, 'Ajax.liste.docCat');
        // Controller Content
        $router->public($base_url . '/content/test', ContentController::class, 'Ajax.content.test');
        $router->get($base_url . '/content/refresh-menu', ContentController::class, 'Ajax.content.refreshMenu');
        
        
        
        // Controller validator
        $router->public($base_url . '/validator/isStringSansEspace', ValidatorController::class, 'Ajax.validator.isStringSansEspace');
        $router->public($base_url . '/validator/isStringAvecEspace', ValidatorController::class, 'Ajax.validator.isStringAvecEspace');
        $router->public($base_url . '/validator/zoom', ValidatorController::class, 'Ajax.validator.zoom');
        $router->public($base_url . '/validator/zoomRequete', ValidatorController::class, 'Ajax.validator.zoomRequete');
        $router->public($base_url . '/validator/zoomListe', ValidatorController::class, 'Ajax.validator.zoomListe');
        $router->public($base_url . '/validator/date', ValidatorController::class, 'Ajax.validator.date');
        $router->public($base_url . '/validator/isDateOuverte', ValidatorController::class, 'Ajax.validator.isDateOuverte');
        
        $router->public($base_url . '/validator/float', ValidatorController::class, 'Ajax.validator.float');
        $router->public($base_url . '/validator/integer', ValidatorController::class, 'Ajax.validator.integer');
        $router->public($base_url . '/validator/societe', ValidatorController::class, 'Ajax.validator.societe');
        $router->public($base_url . '/validator/demandeur', ValidatorController::class, 'Ajax.validator.demandeur');
        $router->public($base_url . '/validator/acheteur', ValidatorController::class, 'Ajax.validator.acheteur');
        $router->public($base_url . '/validator/utilisateur', ValidatorController::class, 'Ajax.validator.utilisateur');
        $router->public($base_url . '/validator/numeroCde', ValidatorController::class, 'Ajax.validator.numeroCde');
        $router->public($base_url . '/validator/iban', ValidatorController::class, 'Ajax.validator.iban');
        $router->public($base_url . '/validator/bic', ValidatorController::class, 'Ajax.validator.bic');
        $router->public($base_url . '/validator/facturef-fournisseur', ValidatorController::class, 'Ajax.validator.factureFournisseur');
        $router->public($base_url . '/validator/date-fabricant-fournisseur', ValidatorController::class, 'Ajax.validator.dateFafou');
        $router->public($base_url . '/validator/devise', ValidatorController::class, 'Ajax.validator.devise');
        $router->public($base_url . '/validator/dateper', ValidatorController::class, 'Ajax.validator.datePer');
        $router->public($base_url . '/validator/isStringWithContent', ValidatorController::class, 'Ajax.validator.isStringWithContent');
        $router->public($base_url . '/validator/isHourWithSeconde', ValidatorController::class, 'Ajax.validator.isHoursWithSeconde');
        $router->public($base_url . '/validator/isHoursWithSecondeCC', ValidatorController::class, 'Ajax.validator.isHoursWithSecondeCC');
        $router->public($base_url . '/validator/isHours', ValidatorController::class, 'Ajax.validator.isHours');
        $router->public($base_url . '/validator/sectionImputation', ValidatorController::class, 'Ajax.validator.sectionImputation');
        $router->public($base_url . '/validator/codeGestion', ValidatorController::class, 'Ajax.validator.codeGestion');
        $router->public($base_url . '/validator/codeComplementaire', ValidatorController::class, 'Ajax.validator.codeComplementaire');
        $router->public($base_url . '/validator/sousCompteAnalyse', ValidatorController::class, 'Ajax.validator.sousCompteAnalyse');
        $router->public($base_url . '/validator/direction', ValidatorController::class, 'Ajax.validator.direction');
        $router->public($base_url . '/validator/natureAnalytique', ValidatorController::class, 'Ajax.validator.natureAnalytique');
        $router->public($base_url . '/validator/centreAnalyse', ValidatorController::class, 'Ajax.validator.centreAnalyse');
        $router->public($base_url . '/validator/validatorTSDON', ValidatorController::class, 'Ajax.validator.validatorTSDON');
        
        $router->public($base_url . '/validator/dateReglement', ValidatorController::class, 'Ajax.validator.dateReglement');
        $router->public($base_url . '/validator/accordCadre', ValidatorController::class, 'Ajax.validator.accordCadre');
        $router->public($base_url . '/validator/fournisseur', ValidatorController::class, 'Ajax.validator.fournisseur');
        $router->public($base_url . '/validator/numeroDemandeAchat', ValidatorController::class, 'Ajax.validator.numeroDemandeAchat');
        $router->public($base_url . '/validator/siteStock', ValidatorController::class, 'Ajax.validator.siteStock');
        $router->public($base_url . '/validator/quantiteLigneDA', ValidatorController::class, 'Ajax.validator.quantiteLigneDA');
        $router->public($base_url . '/validator/codePostal', ValidatorController::class, 'Ajax.validator.codePostal');
        $router->public($base_url . '/validator/adresseMail', ValidatorController::class, 'Ajax.validator.adresseMail');
        $router->public($base_url . '/validator/isUrlValide', ValidatorController::class, 'Ajax.validator.isUrlValide');
        $router->public($base_url . '/validator/quantiteConditionnement', ValidatorController::class, 'Ajax.validator.quantiteConditionnement');
        $router->public($base_url . '/validator/tauxTva', ValidatorController::class, 'Ajax.validator.tauxTva');
        $router->public($base_url . '/validator/unite', ValidatorController::class, 'Ajax.validator.unite');
        $router->public($base_url . '/validator/isCode', ValidatorController::class, 'Ajax.validator.isCode');

        //Controller Outil
        $router->public($base_url . '/outil/convertLibelle', OutilController::class, 'Ajax.outil.convertLibelle');
        $router->public($base_url . '/outil/convertLibelleCodeGestion', OutilController::class, 'Ajax.outil.convertLibelleCodeGestion');
        $router->get($base_url . '/outil/downloadFichier/{url:' . $expression_underscore . '+}', OutilController::class, 'Ajax.outil.downloadFichier');
        $router->get($base_url . '/outil/downloadFichierCsv/{url:' . $expression_underscore . '+}', OutilController::class, 'Ajax.outil.downloadCSV');
        $router->get($base_url . '/outil/downloadPdf/{url:' . $expression_underscore . '+}', OutilController::class, 'Ajax.outil.downloadPdf');
        $router->get($base_url . '/outil/initialisationCS', OutilController::class, 'Ajax.outil.initialisationCS');
        $router->get($base_url . '/outil/contentText', OutilController::class, 'Ajax.outil.contentText');
        $router->public($base_url . '/outil/captcha/{idCaptcha:' . $expression_underscore . '+}/{inputCaptcha:' . $expression_underscore . '+}[/{refresh:[0-9]+}]', OutilController::class, 'Ajax.outil.captcha');
        $router->public($base_url.'/popup-information', OutilController::class, 'Ajax.Outil.popupInformationValid');
        
        $router->public($base_url.'/creatFicBatch', OutilController::class, 'Ajax.Outil.creatFicBatch');
                
        $router->get($base_url.'/execAsync', OutilController::class, 'Ajax.Outil.appelAsync');
        $router->public($base_url.'/cgActifForSi', OutilController::class, 'Ajax.Outil.cgActifForSi');
        
        //Controller Filtre Avance
        $router->get($base_url . '/filtre-avance/nouveau-critere', FiltreAvanceController::class, 'Ajax.facture.nouveauCritere');
        $router->get($base_url . '/filtre-avance/nouveau-tuple-form', FiltreAvanceController::class, 'Ajax.facture.nouveauTupleform');
        $router->get($base_url . '/validationMail', MailController::class, 'Ajax.MailController.validationMail');

        // Controller MailFacture
        $router->get($base_url . '/emailUtilisateur', MailController::class, 'Ajax.MailController.emailUtilisateur');
        $router->get($base_url . '/emailContactFournisseur', MailController::class, 'Ajax.MailController.emailContactFournisseur');
        $router->get($base_url . '/envoiMail', MailController::class, 'Ajax.MailController.envoiMail');

        // Controller Session
        $router->get($base_url . '/SuppresionSession', SessionController::class, 'Ajax.SessionCreation.unsetSession');
        $router->get($base_url . '/getSessionOnglet', SessionController::class, 'Ajax.SessionCreation.getOnglet');
        $router->get($base_url . '/sessionOnglet', SessionController::class, 'Ajax.SessionCreation.ongletSession');
        $router->get($base_url . '/bulleFilre', SessionController::class, 'Ajax.SessionCreation.bulleFiltre');

        
        // Controller Erreur
        $router->public($base_url.'/popuperreurvalid', ErreurController::class, 'Ajax.Erreur.popupErreurValid');
        $router->public($base_url.'/popuperreurxml', ErreurController::class, 'Ajax.Erreur.popupErreurXml');
        $router->public($base_url.'/ajoutSignataire', ErreurController::class, 'Ajax.Erreur.ajaxAjoutSignataire');
        $router->public($base_url.'/popupconfirmationsuppression', ErreurController::class, 'Ajax.Erreur.popupConfirmationSuppresion');
        $router->public($base_url.'/popupconfirmationGestion', ErreurController::class, 'Ajax.Erreur.popupConfirmationGestion');
        $router->public($base_url.'/popupconfirmationSupressionNoteur', ErreurController::class, 'Ajax.Erreur.popupConfirmationSuppresionNoteur');
        $router->public($base_url.'/popupconfirmationRedirection', ErreurController::class, 'Ajax.Erreur.popupConfirmationRedirection');
        $router->public($base_url.'/popupInformation', ErreurController::class, 'Ajax.Erreur.popupInformation');
        $router->public($base_url.'/popupAlerteEtAvertissement', ErreurController::class, 'Ajax.Erreur.popupErreurAlerteEtAvertissement');

       
        
        
        
        // Controller TreeviewControler
        $router->public($base_url . '/treeview/codeGestion', TreeviewController::class, 'Ajax.Treeview.codeGestion');
        $router->get($base_url . '/treeview/getCodeGestion', TreeviewController::class, 'Ajax.Treeview.getCodeGestion');
        
        $router->public($base_url . '/treeview/uo[/{divCode:'.$societe.'+}/{divLibelle:'.$societe.'+}[/{all:'.$num.'+}]]', TreeviewController::class, 'Ajax.Treeview.uoTreeview');

        
        $router->public($base_url . "/treeview/test", TreeviewController::class, 'Ajax.Treeview.treeview');



        // Notification
        
        $router->get($base_url . '/notification/maj', \Modules\Ajax\Controller\NotificationController::class, 'Ajax.Notification.majNotification');
        $router->get($base_url . '/notification/ajout', \Modules\Ajax\Controller\NotificationController::class, 'Ajax.Notification.ajoutNotification');



        // Auto complete
        
        $router->public($base_url . '/auto-complete/autocomplete', \Modules\Ajax\Controller\AutoCompleteController::class, 'Ajax.AutoComplete.autocomplete');
        
        // $router->get($base_url . '/auto-complete/autocomplete/{function:'.$function.'+}', \Modules\Ajax\Controller\AutoCompleteController::class, 'Ajax.AutoComplete.function');

        // InitCS
        $router->get($base_url . '/init-cs', \Modules\Ajax\Controller\InitChampController::class, 'Ajax.InitChampController.csInit');

        
        // Facture - Export Masse
        $router->get($base_url . '/exportMasse/traitementAsynchrone', ExportMasseFacturesController::class, 'Ajax.ExportMasseFactures.traitementAsynchroneExport');
    
    
        // Carac complémentaire
        $router->get($base_url . '/calculeCC', \Modules\Ajax\Controller\CaracComplController::class, 'Ajax.CaracCompl.calcCC');
        
        // TestService Controller pour tester les services
        $router->get($base_url . '/TestService/testSMTP', \Modules\Ajax\Controller\TestServiceController::class, 'Ajax.TestService.testSMTP');
    }
}
