<?php
namespace Modules\ProjetAchat\Rules;

use Psr\Http\Message\ServerRequestInterface;

class GestionProjetAchat
{
    protected ServerRequestInterface $request;
    protected \PDO $pdo;
    protected Main $main;

    public function __construct(ServerRequestInterface $request, \PDO $pdo)
    {
        $this->request    = $request;
        $this->pdo        = $pdo;
        $this->main       = new Main($this->request, $this->pdo);
    }

    public function ajaxPlanning(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function popupTransfere(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function ajaxTransmettre(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function devalider(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function validate(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function confirmationValidate(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function cloture(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function confirmationCloture(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function duplicate(): bool
    {
        return $this->main->creatEditAccess();
    }

    public function ajourne(): bool
    {
        return $this->main->adjournResumeAccess();
    }

    public function reprendre(): bool
    {
        return $this->main->adjournResumeAccess();
    }

    public function listeModeleImport(): bool
    {
        return ($this->main->modelImportAccess() || $this->main->creatEditAccess());
    }

    public function modeleImport(): bool
    {
        return $this->main->modelImportAccess();
    }

    public function popupExport(): bool
    {
        return $this->main->creatModDoaAccess();
    }

    public function export(): bool
    {
        return $this->main->creatModDoaAccess();
    }


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

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

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

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

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