{% extends "base.html" %}
{% import "macros/ui.html" as ui %}

{% block title %}{% if ok %}{{ t(key="verify-ok-title", lang=lang | default(value='sk')) }}{% else %}{{ t(key="verify-fail-title", lang=lang | default(value='sk')) }}{% endif %}{% endblock title %}

{% block content %}
<div class="mx-auto mt-8 max-w-sm">
  <div
    class="rounded-radius border border-outline bg-surface-alt p-5 shadow-sm dark:border-outline-dark dark:bg-surface-dark-alt">
    {% if ok %}
    <h1 class="text-xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong">
      {{ t(key="verify-ok-title", lang=lang | default(value='sk')) }}
    </h1>
    <p class="mt-3 text-sm text-on-surface dark:text-on-surface-dark">
      {{ t(key="verify-ok-body", lang=lang | default(value='sk')) }}
    </p>
    {{ ui::button(label=t(key="login-auth", lang=lang | default(value='sk')), href="/login", extra="mt-4 w-full") }}
    {% else %}
    <h1 class="text-xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong">
      {{ t(key="verify-fail-title", lang=lang | default(value='sk')) }}
    </h1>
    {{ ui::alert_danger(message=t(key="verify-fail-body", lang=lang | default(value='sk')), extra="mt-3") }}
    {{ ui::button(label=t(key="nav-login", lang=lang | default(value='sk')), href="/login", variant="outline-primary", extra="mt-4 w-full") }}
    {% endif %}
  </div>
</div>
{% endblock content %}
