<?php
namespace Modules\GlobalApplication\Rules;

use GuzzleHttp\Psr7\Response;
use Psr\Http\Message\MessageInterface;
use Psr\Http\Message\ServerRequestInterface;

// @phpcs:ignore
class ContactsFournisseur
{
    /** @var ServerRequestInterFace $request */
    protected ServerRequestInterface $request;
    
    /** @var \PDO $pdo */
    protected \PDO $pdo;
    
    public function __construct(ServerRequestInterface $request, \PDO $pdo)
    {
        $this->request  = $request;
        $this->pdo      = $pdo;
    }


    /**
     * @return bool
     */
    public function ajaxListeContact(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    public function ajaxListeMultiContact(): MessageInterface|bool
    {
        if (!isset($_SESSION['user_is_logged']) || $_SESSION['user_is_logged'] == false) {
            return false;
        }
        return true;
    }

    /**
     * @return bool
     */
    public function ajaxAjoutLigneContact(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    public function validationContact(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    public function suppressionContact(): bool
    {
        return true;
    }
}
