<PhoenixKitWeb.Components.AuthPageWrapper.auth_page_wrapper
  flash={@flash}
  phoenix_kit_current_scope={assigns[:phoenix_kit_current_scope]}
  page_title={gettext("Resend confirmation")}
  current_path={assigns[:url_path] || "/users/confirm"}
  dev_mailbox_message={gettext("confirmation emails")}
>
  <%= if @awaiting_confirmation? do %>
    <h1 class="text-2xl font-bold text-center mb-2">
      {gettext("Confirm your email")}
    </h1>
    <p class="text-center text-base-content/60 text-sm mb-6">
      {gettext(
        "We sent a confirmation link to your inbox. This page continues automatically once your email is confirmed."
      )}
    </p>
  <% else %>
    <h1 class="text-2xl font-bold text-center mb-2">
      {gettext("No confirmation instructions received?")}
    </h1>
    <p class="text-center text-base-content/60 text-sm mb-6">
      {gettext("We'll send a new confirmation link to your inbox")}
    </p>
  <% end %>
  <.form for={@form} id="resend_confirmation_form" phx-submit="send_instructions">
    <fieldset class="fieldset min-w-0">
      <legend class="fieldset-legend sr-only">{gettext("Resend Confirmation")}</legend>
      <.input field={@form[:email]} type="email" label={gettext("Email")} required />
      <button
        type="submit"
        phx-disable-with={gettext("Sending...")}
        class="btn btn-primary w-full mt-4 transition-all hover:scale-[1.02] active:scale-[0.98]"
      >
        {gettext("Resend confirmation instructions")} <span aria-hidden="true">→</span>
      </button>
    </fieldset>
  </.form>
  <div class="text-center mt-4 text-sm">
    <.link
      href={Routes.path("/users/register")}
      class="font-semibold text-primary hover:underline"
    >
      {gettext("Register")}
    </.link>
    <span class="mx-2 text-base-content/40">|</span>
    <.link
      href={Routes.path("/users/log-in")}
      class="font-semibold text-primary hover:underline"
    >
      {gettext("Log in")}
    </.link>
  </div>
</PhoenixKitWeb.Components.AuthPageWrapper.auth_page_wrapper>
