<?php

namespace Modules\Additional\Specifique\Client92\Html;

use Helpers\Outil\Roles;
use Helpers\Trad\Trad;
use Skeleton\Router;

class MenuLeft extends \Twig\Extension\AbstractExtension
{
    
    /**
     * @param  Router $router
     * @param  string $menuActive
     * @return array<mixed>
     */
    public static function getListeMenuLeftSpecifique(\PDO $pdo, Router $router, ?string $menuActive = null) : array
    {
        if (Roles::droitsUtilisateur($pdo, 'SpeABUDGET', $_SESSION["Session_Login"])) {
            $menu[] = [
                'icon' => 'mg-upload',
                'active' => ($menuActive == 'importBudget'),
                'link' => $router->generateUri('Specifique92.ImportBudget.import'),
                'label' => 'Import budgetaire',
            ];
        }

        $menu[] = [
            'icon' => 'mg-bibliotheque',
            'active' => ($menuActive == 'consultation'),
            'link' => $router->generateUri('Specifique92.ConsultationBudget.listeBudget'),
            'label' => 'Consultation budgétaire',
        ];
        
        return $menu;
    }
}
