<?php

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

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

class MenuLeft
{
    /**
     * @param \PDO $pdo
     * @param Router $router
     * @param string $active
     * @return array<mixed>
     */
    public static function getMenuLeftSpecifique(
        \PDO $pdo,
        Router $router,
        string $active
    ) : array {


        $lien = \Modules\Additional\Specifique\Client163\Modules\Parametrage\Service\Parametrage::getMenuParametrage(
            $router->generateUri('Specifique163.Parametrage.urlfulll'),
            $pdo
        );
        
        $menu = [];
        if ($lien &&
                (Roles::droitsUtilisateur($pdo, 'HA_PARAM')
                || Roles::GetALL()
                )
        ) {
            $menu[] = [
                'active' => ($active == 'menuLeftQualityReview'),
                'icon' => 'icosq-mg-parametrage',
                'label' => 'Parametrage Full',
                'link' => $lien,
                'data_titre' => 'Parametrage Full',
                'data_path' => 'Specifique163.Parametrage.urlfulll'
            ];
        }
        return $menu;
    }
}
