<?php
$bp = Auth::basePath();
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Verify email — <?= h(cfg('app_name')) ?></title>
  <script>
    (function () {
      var l = localStorage.getItem('crash_console_lang');
      if (l === 'en' || l === 'ru') document.documentElement.setAttribute('lang', l);
    })();
  </script>
  <link rel="stylesheet" href="<?= h($bp) ?>/assets/css/app.css">
  <script src="<?= h($bp) ?>/assets/js/i18n.js" defer></script>
</head>
<body class="login-page" data-base-path="<?= h($bp) ?>">
  <div class="login-card">
    <h1 data-i18n="verify.title">Email verification</h1>
    <?php if (!empty($verifyOk)): ?>
      <p class="alert alert--ok" data-i18n="verify.ok">Your email is verified. You can sign in and enroll two-factor authentication.</p>
      <p><a class="btn" href="<?= h($bp) ?>/login" data-i18n="verify.sign_in">Sign in</a></p>
    <?php else: ?>
      <p class="alert" data-i18n="verify.fail"><?= h($verifyError ?? 'Invalid or expired link.') ?></p>
      <p class="hint"><a href="<?= h($bp) ?>/register" data-i18n="verify.register_again">Register again</a></p>
    <?php endif; ?>
  </div>
  <?php platform_render_footer(); ?>
</body>
</html>
