<?php

namespace Modules\Additional\Specifique\Client112\Html\Facture;

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

class MenuLeft extends \Twig\Extension\AbstractExtension
{
    /**
     * @param  Router $router
     * @param  string $menuActive
     * @return array<mixed>
     */
    public static function getMenuLeftSpecifique(\PDO $pdo, Router $router, ?string $menuActive = null): array
    {
        $menu = [];

        if (Roles::droitsUtilisateur($pdo, 'HA_PARAM', $_SESSION["Session_Login"])) {
            $menu[] = [
                'icon'   => 'mg-parametrage',
                'active' => ($menuActive == 'affectationSIContrat'),
                'link'   => $router->generateUri('Specifique112.ParamSIContratFournisseur.read'),
                'label'  => 'Affectation SI / Contrat',
            ];
        }

        return $menu;
    }
}
