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

namespace Kufer\KuferTools\Basis\Kursdetails\DetailsReiter\Termine\TerminVerlaengernDialog\Wunsch;

abstract class TerminVerlaengernAbsendenEMailPresenter extends \Kufer\KuferTools\Basis\Presenter\Presenter
{
  protected $view;

  public function present()
  {
    $view = $this->getView();

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

  
  public function getBetreff()
  {
    return $this->getView()->getNoData();
  }

  abstract protected function createView();

  
  protected function getView()
  {
    $this->view = $this->view ?? $this->createView();

    return $this->view;
  }

  protected function getNewViewModel()
  {
    return new TerminVerlaengernAbsendenEMailViewModel();
  }

  protected function getViewModel()
  {
    $viewModel = $this->getNewViewModel();
    $viewModel->kurs = $this->useCaseResponse->kurs;
    $viewModel->toolId = $this->useCaseResponse->toolId;

    return $viewModel;
  }
}