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

namespace Kufer\Web\KuferTools\Oeffentlich\PasswortAendern\SendePasswortAendernFormular;

class SendePasswortAendernFormularPresenter extends \Kufer\Web\KuferTools\Basis\Presenter\MitRahmenPresenter
{
  protected function getContent()
  {
    $view = $this->getView();

    return $view->getNoData();
  }

  protected function getView()
  {
    return new SendePasswortAendernFormularView($this->getViewModel());
  }

  protected function getViewModel()
  {
    $viewModel = new SendePasswortAendernFormularViewModel();
    $viewModel->https = $this->useCaseResponse->https;
    $viewModel->login = $this->useCaseResponse->login;

    return $viewModel;
  }

  protected function getJSDeclarations(): string
  {
    $result = parent::getJSDeclarations();
    $result .= \JsOperations::getDeclarationInt('KuferTools.pwMinLength', $this->useCaseResponse->pwAnzahlZeichen);

    return $result;
  }

  protected function getSeitenTitel(): string
  {
    return 'Passwort ändern';
  }
}