<?php

namespace Modules\Additional\Specifique\Client155\Html\Fournisseur;

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>
     * @deprecated
     */
    public static function getListeMenuLeftSpecifique(
        \PDO $pdo,
        Router $router,
        string $active
    ) {
        $menu = [];
        if (Roles::droitsUtilisateur($pdo, 'HA_PRO_MOD')
            && Roles::droitsUtilisateur($pdo, 'SpeSYSU001'/* Sysu : Admin fourniss */)
        ) {
            $menu[] = [
                'icone' => 'mg-upload',
                'active' => ($active == 'ImportReportPerf'),
                'link' => $router->generateUri('Specifique155.reportingPerformance.importMultiple'),
                'label' => 'Import multiple reporting',
            ];
        }

        return $menu;
    }

    /**
     * @return array<mixed>
     */
    public static function getMenuLeftSpecifique(
        \PDO $pdo,
        Router $router,
        string $active
    ) {
        $menu = [];

        if (Roles::droitsUtilisateur($pdo, 'HA_PRO_MOD')
            && Roles::droitsUtilisateur($pdo, 'SpeSYSU001'/* Sysu : Admin fourniss */)
        ) {
            $menu[] = [
                'active' => ($active == 'ImportReportPerf'),
                'icon' => 'mg-upload',
                'label' => 'Import multiple reporting',
                'link' => $router->generateUri('Specifique155.reportingPerformance.importMultiple'),
                'data_titre' => 'Import report perf',
                'data_path' => 'Specifique155.reportingPerformance.importMultiple',
               // 'submenu' => [],
            ];
        }

        return $menu;
    }
}
