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

namespace Kufer\Web\KuferTools\Basis\Kursdetails\Detailsreiter\EMails;

use Kufer\Web\Classes\ExportAdapter\ExpAdditionalVariables;


class EMailsRowView extends \Kufer\Web\KuferTools\Basis\View\ViewSight
{
  public function getTemplatePathRelative()
  {
    return 'basis/kursdetails/detailsreiter/emailrow.sgt';
  }

  protected function getDefaultDataModulArray()
  {
    return array($this->viewModel->datDoc);
  }

  protected function getDefaultExportAdapter()
  {
    return new ExpAdditionalVariables(new \ExportKursEMails(), $this->createVariableAssignments());
  }

  protected function createVariableAssignments(): array
  {
    return array(
      'is_header' => $this->viewModel->isHeader ? '1' : '0',
      'show_checkbox' => $this->viewModel->showCheckbox ? '1' : '0',
    );
  }
}