<?php
namespace Modules\API\APIInterne\OxaMobility\Controller;

use SimpleXMLElement;
use Helpers\Trad\Trad;
use Skeleton\Controller\Controller;
use Helpers\Outil\Outils;
use Helpers\Fichier\Fichier;
use Modules\API\APIInterne\OxaMobility\Outil\OutilExtension;

// phpcs:ignore
class PAGE_PanierDetailController extends Controller
{
    public function init() : void
    {
        /** A deplacer dans absAPIcontroller plus tard car pas top */
        $trad = $this->getTranslationService();
        if ($trad instanceof Trad) {
            $trad->setLang($_SESSION['Session_Langue']);
        }
    }


    public function INITAction($body = [], $jwtPayload = [], $json = true)
    {
        $trad = $this->getTranslationService();
        $return['Trads']['MLS_Titre_Page_Detail']           = $trad->t('Détail fournisseur');
        $return['Trads']['MLS_Txt_Fournisseur']             = $trad->t('Fournisseur') . $trad->colon();
        $return['Trads']['MLS_Txt_Articles']                = $trad->t('Articles') . $trad->colon();
        $return['Trads']['MLS_Txt_Frais']                   = $trad->t('Frais annexes') . $trad->colon();
        $return['Trads']['MLS_Txt_Total_Fournisseur']       = $trad->t('Total fournisseur (HT)') . $trad->colon();
        $return['Trads']['MLS_Txt_Total_Articles']          = $trad->t('Total HT') . $trad->colon();
        $return['Trads']['MLS_Txt_Total_Frais']             = $trad->t('Total frais annexes (HT)') . $trad->colon();
        $return['Trads']['MLS_Txt_Unite']                   = $trad->t('Unité') . $trad->colon();
        $return['Trads']['MLS_Txt_Total_Ligne']             = $trad->t('Total (HT)');
        $return['Trads']['MLS_Txt_HT']                      = $trad->t('HT');
        $return['Trads']['MLS_Btn_Retour_ValiderPanier']    = $trad->t('Valider mon panier');
        $return['Trads']['MLS_Btn_Annuler']                 = $trad->t('Annuler les articles de ce fournisseur');
        $return['Trads']['MLS_Btn_Soumettre']               = $trad->t('Soumettre pour ce fournisseur');
        $return['Trads']['MLS_Ref_Four']                    = $trad->t('Réf Four');
        $return['Trads']['MLS_PU_HT']                       = $trad->t('Prix unitaire HT');
        $return['Trads']['MLS_Date_Livraison_Ligne']        = $trad->t('Livraison le') . $trad->colon();
        $return['Trads']['MLS_Info_Adresse']                = $trad->t('Veuillez sélectionner l\'adresse de commande du fournisseur');
        $return['Trads']['MLS_Adr_Cde']                     = $trad->t('Adr. de Cde');
        $return['Trads']['MLS_BoutonChoisir']               = $trad->t('Choisir');
       
        return OutilExtension::checkExtension($body, $return, $json);
    }
}
