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

namespace Kufer\KuferTools\Teilnehmer\Visitenkarten\VisitenkartenUebersicht\NeueVisitenkarteErstellen;

class NeueVisitenkarteErstellenPresenter extends \Kufer\KuferTools\Basis\Presenter\MitRahmenPresenter
{
  public function getJsFilesSrcAryWeitere()
  {
    $js = parent::getJsFilesSrcAryWeitere();
    $js[] = $this->getJsFileFromSys('webvisitenkarten.js');

    return $js;
  }

  protected function getView()
  {
    return new NeueVisitenkarteErstellenView($this->getViewModel());
  }

  protected function getViewModel()
  {
    $viewModel = new NeueVisitenkarteErstellenViewModel();
    $viewModel->ueberschrift = $this->useCaseResponse->ueberschrift;
    $viewModel->visitenkarte = $this->useCaseResponse->visitenkarte;
    $viewModel->columns = $this->useCaseResponse->columns;
    $viewModel->buttons = $this->useCaseResponse->buttons;

    return $viewModel;
  }

  protected function getAktuelleURLRelative()
  {
    $url = \URL::loadCurrent();

    return $url->getUrlRelative();
  }
}