<?php

namespace Modules\Commande\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 ModeleMenuContextuel 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
     * @return array<mixed>
     */
    public function generate($obj)
    {
        $menuContextuel = [];

        $menuContextuel['listeSecondaire'][] = [
            'libelle' => $this->trad->t('Visualiser'),
            'lien' => $this->router->generateUri('Commande.Modele.detailModele', ['idModele' => $obj['COD_MOD']]),
            'lienJs' => false,
        ];

        return $menuContextuel;
    }
}
