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

namespace Kufer\KuferTools\Teilnehmer\Anmeldung\KursUebersicht\Detailsreiter\Termine;

class TermineUseCase extends \Kufer\KuferTools\Basis\Kursdetails\DetailsReiter\Termine\TermineUseCase
{
  public static function getToolId()
  {
    return \ToolsAPI::TOOL_ANMELDUNGBUCHEN_TN;
  }

  public static function getToolSectionId()
  {
    return 96;
  }

  protected function getMainReiterId()
  {
    return 337;
  }

  protected function getDatamodulHelper($kurs): \Kufer\KuferTools\Utils\DatamodulHelper\KursTageHelper\KurstageZuKurs
  {
    return new \Kufer\KuferTools\Utils\DatamodulHelper\KursTageHelper\TnKurstageZuKurs($this->toolSettings, $this->getUser(), $this->request, $kurs, null);
  }

  protected function getButtons()
  {
    $buttonsObj = new \Kufer\KuferTools\Basis\Kursdetails\DetailsReiter\TnTermineReiterButtons($this, $this->request, $this->response);
    $buttonsArray = $buttonsObj->getButtons();
    $selectionDependentButtons = array('Terminplan');
    $this->response->markierenButtons = $this->markierenButtonNotwendig($buttonsArray, $selectionDependentButtons);

    return $buttonsArray;
  }
}