<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

namespace Kufer\KuferTools\Mitarbeiter\KursUebersicht\Detailsreiter\Teilnehmer\HandleAbmeldung;

class FaStornoPresenter extends \Kufer\KuferTools\Basis\Presenter\Presenter implements \Kufer\Mail\EMail\IEMail
{
  
  protected $cachedView;

  protected function getView()
  {
    if (is_null($this->cachedView)) {
      $this->cachedView = new FaStornoView($this->getViewModel());
    }

    return $this->cachedView;
  }

  protected function getViewModel()
  {
    return $this->useCaseResponse;
  }

  public function getContentType(): int
  {
    return \Kufer\Mail\EMail\IEMail::TYPE_HTML;
  }

  public function getContent(): string
  {
    $view = $this->getView();

    return $view->getBody() . $view->getFooter() . $view->getNoData();
  }

  public function getSubject(): string
  {
    return $this->getView()->getHeader();
  }

  public function getAttachments(): array
  {
    return array();
  }
}