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

namespace Kufer\Web\KuferTools\Firma\KursUebersicht\Detailsreiter\Storno;

class HandleStornoPresenter extends \Kufer\Web\KuferTools\Basis\Presenter\MitRahmenPresenter
{
  protected function getView()
  {
    return new HandleStornoView($this->getViewModel());
  }

  protected function getViewModel()
  {
    $viewModel = new HandleStornoViewModel();
    $viewModel->stornoStatus = $this->useCaseResponse->stornoStatus;
    $viewModel->kurs = $this->useCaseResponse->kurs;
    
    $viewModel->kurs->toolId = $this->useCaseResponse->toolId;
    $viewModel->kurs->belegId = $this->useCaseResponse->belegId;
    $viewModel->kurs->kursArtikelDativ = $this->useCaseResponse->sprachSettings->Kurs['Singular_mit_Artikel']['Dativ'];
    $viewModel->kurs->kursArtikelGenitiv = $this->useCaseResponse->sprachSettings->Kurs['Singular_mit_Artikel']['Genitiv'];

    return $viewModel;
  }

  protected function getJsFilesSrcAryWeitere(): array
  {
    return array(
      $this->getJsFileFromOldTools('Formulare/kontakte.js'),
      $this->getJsFileFromSys('kontaktformular.js')
    );
  }
}