<?php

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

use Entity\Model\Paravrac;
use Helpers\ChampsSupplementaire\ChampSupp;
use Helpers\Outil\MenuContextuel;
use Helpers\Outil\Sql;
use Helpers\Trad\ITrad;
use Helpers\Trad\Trad;
use Modules\Commande\Rules\GestionCommande;
use Modules\GlobalApplication\Repository\LicenceOxalys;
use Skeleton\Router;

class ImportMenuContextuel extends MenuContextuel
{
    /**
     * @var array<mixed> $droit
     */
    public $droit;
    
    /**
     * @param array<mixed> $droit
     */
    public function __construct(\PDO $pdo, Router $router, ITrad $trad, $droit)
    {
        parent::__construct($pdo, $router, $trad);
        
        $this->droit = $droit;
    }
    
    /**
     * @param array<mixed> $obj
     * @param string $id
     * @return array<mixed>
     */
    public function generate($obj, $id)
    {
        $menuContextuel = [];
        
        $menuContextuel['listeSecondaire'][] = [
            'libelle' => $this->trad->t('Modifier'),
            'lien' => $this->router->generateUri('Specifique155.reportingPerformance.editReport', ['periode' => $obj['CODE_PERIODE'], 'id' => $id, 'ssf' => $obj['CODE_SOUS_FAMILLE']]),
            'lienJs' => false,
        ];
        
        $menuContextuel['listeSecondaire'][] = [
            'libelle' => $this->trad->t('Supprimer'),
            'lien' => $this->router->generateUri('Specifique155.reportingPerformance.delete', ['periode' => $obj['CODE_PERIODE'], 'id' => $id, 'ssf' => $obj['CODE_SOUS_FAMILLE']]),
            'lienJs' => false,
        ];
        
        return $menuContextuel;
    }
}
