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

namespace Kufer\KuferTools\Dozent\Kursplanung\TerminSammelaenderung;

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

  protected function getViewModel()
  {
    $viewModel = new TerminSammelaenderungFormularViewModel();
    $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()
  {
    return array(
      $this->getJsFileFromSys('doz_kursplanung.js')
    );
  }
}