<?php

namespace Modules\Additional\Specifique\Client77\Modules\Liste\Service;

use Helpers\ChampsSupplementaire\ChampSupp;
use Helpers\Outil\Sql;

class SpecifiqueSI
{
    /**
     * @param \PDO $pdo
     * @param array<mixed> $array
     * @return string
     */
    public static function clauseSI(\PDO $pdo, $array) : string
    {
        $resultSuite = ChampSupp::getCSValueSpecific([
            'COD_TAB' => 'CENTRE',
            'COD_ENR' => $array['CenterEmetteur'],
            'typedico' => 'PARAMSPAC',
            'codedico' => 'NCS_CENTRE_CTR_GEST',
        ], $pdo);

        $req = " AND (SECTIMPU.CODE_DIR = '" . ($resultSuite['VALEUR']??'') . "') ";

        return $req;
    }
}
