<?php

namespace Modules\Suivi\Rules;

use Helpers\Outil\Roles;
use Psr\Http\Message\ServerRequestInterface;

class SuiviFac
{
    protected ServerRequestInterface $request;
    protected \PDO $pdo;
        
    /**
     * __construct
     *
     * @param  ServerRequestInterface $request
     * @return void
     */
    public function __construct(ServerRequestInterface  $request, \PDO $pdo)
    {
        $this->request  = $request;
        $this->pdo      = $pdo;
    }
    
    /**
     * init
     *
     * @return bool
     */
    public function init() : bool
    {
        return Roles::droitsUtilisateur($this->pdo, 'HA_FA_VISU')? true:false;
    }


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

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

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