<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_formea
 *
 * @copyright   Copyright (C) 2010-2025 Feseur Sdn Bhd. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @version     1.3.0
 */
defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Formea\Site\View\Redirection\HtmlView;

/** @var HtmlView $this */

if (!empty($this->submissionResponse)) { ?>
  <div style="display: block;padding:50px">
    <?php if (!empty($this->submissionResponse->redirectTitle)): ?>
      <h1 style="text-align: center"><?php echo $this->submissionResponse->redirectTitle; ?></h1>
    <?php endif; ?>
    <?php if (!empty($this->submissionResponse->redirectDescription)): ?>
      <p style="text-align: center"><?php echo $this->submissionResponse->redirectDescription; ?></p>
    <?php endif; ?>
    <form method="<?php echo $this->submissionResponse->redirectMethod; ?>" action="<?php echo $this->submissionResponse->redirectAwayUrl; ?>" id="formeaRedirectForm">
      <?php foreach ($this->submissionResponse->redirectParams as $key => $value) { ?>
        <input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>">
      <?php } ?>
    </form>
  </div>
<?php } ?>