<?php

namespace Modules\Evaluation\Rules;

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

class Association
{
    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 edit(): bool
    {
        if (!$this->main->campaignCreatEditAccess()) {
            return false;
        }

        return true;
    }
    
    public function delete(): bool
    {
        if (!$this->main->campaignCreatEditAccess()) {
            return false;
        }

        return true;
    }


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

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

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

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