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

namespace Kufer\Web\KuferTools\Dozent\Kursplanung\TerminSammelaenderung;

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

  protected function getViewModel()
  {
    $viewModel = new TerminSammelaenderungFormularViewModel();
    $viewModel->toolSection = $this->useCaseResponse->toolSection;
    $viewModel->toolSettings = $this->useCaseResponse->toolSettings;
    $viewModel->kurstag = $this->useCaseResponse->kurstag;
    $viewModel->ktIds = $this->useCaseResponse->ktIds;
    $viewModel->knr = $this->useCaseResponse->knr;
    $viewModel->kursort_hinterlegung = $this->getKursortHinterlegung();
    $viewModel->showDatum = $this->useCaseResponse->showDatum;
    $viewModel->showUhrzeitBeginn = $this->useCaseResponse->showUhrzeitBeginn;
    $viewModel->showUhrzeitEnde = $this->useCaseResponse->showUhrzeitEnde;
    $viewModel->showUE = $this->useCaseResponse->showUE;
    $viewModel->showMinuten = $this->useCaseResponse->showMinuten;
    $viewModel->showPause = $this->useCaseResponse->showPause;
    $viewModel->showAusfall = $this->useCaseResponse->showAusfall;
    $viewModel->showKursort = $this->useCaseResponse->showKursort;
    $viewModel->showBemerkung = $this->useCaseResponse->showBemerkung;

    return $viewModel;
  }

  private function getKursortHinterlegung()
  {
    $buttonStyle = 'position: absolute; right: 20px; top: -3px; font-size: 27px; color: #555; cursor:pointer;';
    $inputIds = array('wt_kt_changeKursort_val');

    return \PageButtonsAPI::getHinterlegungSymbol(\HLDispatcher::HL_KURSORTE, $inputIds, 'button_hl_raum', $buttonStyle, 'hlraum_div', 'Raum');
  }

  protected function getJsFilesSrcAryWeitere(): array
  {
    return array(
      $this->getJsFileFromSys('doz_kursplanung.js')
    );
  }
}