<?php

namespace Modules\Facture\Rules;

use Psr\Http\Message\ServerRequestInterface;

class CreationFacture
{
    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 nouvelleFacture(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function creationAffectation(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function choixCommande(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function choixAvoir(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function choixAffectationLad(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function transitionAffectation(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function wsdlAffectation(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function affectation(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function enregistrerAffectation(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function verifApresEnregistrementFacture(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function validationViaAffectation(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function validationTerminer(): bool
    {
        return $this->main->invoiceValidAccess();
    }

    public function choixSignataireFacture(): bool
    {
        return $this->main->invoiceValidAccess();
    }

    public function confirmationValidationFacture(): bool
    {
        return $this->main->invoiceValidAccess();
    }

    public function confirmationAsyncValidationFacture(): bool
    {
        return $this->main->invoiceValidAccess();
    }

    public function validationFacture(): bool
    {
        return $this->main->invoiceValidAccess();
    }

    public function supprimerAffectation(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }

    public function suppressionAffectationEnCours(): bool
    {
        return $this->main->invoiceCreatEditAccess();
    }


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

    /**
     * @return bool
     */
    // @phpcs:ignore
    public function tableChoixCommande(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    // @phpcs:ignore
    public function tableChoixFacture(): bool
    {
        return true;
    }
}
