<?php

namespace Modules\Contrat\Rules;

use Psr\Http\Message\ServerRequestInterface;

class AccordCadre
{
    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 creation(): bool
    {
        if (!$this->main->contractCreatEditAccess()) {
            return false;
        }

        return true;
    }

    public function modification(): bool
    {
        if (!$this->main->contractCreatEditAccess()) {
            return false;
        }

        return true;
    }

    public function dupliquer(): bool
    {
        if (!$this->main->contractCreatEditAccess()) {
            return false;
        }

        return true;
    }

    public function popupCreationAvenant(): bool
    {
        if (!$this->main->contractCreatEditAccess()) {
            return false;
        }

        return true;
    }

    public function popupCommentaire(): bool
    {
        if (!$this->main->contractCreatEditAccess()) {
            return false;
        }

        return true;
    }

    public function ajaxDupliquer(): bool
    {
        if (!$this->main->contractCreatEditAccess()) {
            return false;
        }

        return true;
    }

    public function suppresionAvenant(): bool
    {
        if (!$this->main->contractCreatEditAccess()) {
            return false;
        }

        return true;
    }


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

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

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

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

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

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

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

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

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

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

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