<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

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

class NeueVisitenkarteErstellenPresenter extends \Kufer\Web\KuferTools\Basis\Presenter\MitRahmenPresenter
{
  public function getJsFilesSrcAryWeitere(): array
  {
    $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->toolSection = $this->useCaseResponse->toolSection;
    $viewModel->toolSettings = $this->useCaseResponse->toolSettings;
    $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();
  }
}