<% content_for :title, 'Sign up' %>
<div class="min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8">
  <div class="sm:mx-auto sm:w-full sm:max-w-md">
    <%= link_to (image_tag "logo.png", class: "h-12 w-auto"), root_path, class: 'flex justify-center' %>
    <h2 class="mt-6 text-center text-3xl leading-9 font-extrabold text-gray-900">
      <%= t("sign_up_new_account") %>
    </h2>
  </div>

  <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
    <%= render "layouts/flash" %>
    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
      <%= form_for(@user, url: registrations_path(@user)) do |f| %>
        <div>
          <%=f.label :email, class: "block text-sm font-medium leading-5 text-gray-700" %>
          <div class="mt-1 rounded-md shadow-sm">
            <%=f.email_field :email, class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md placeholder-gray-400 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 transition duration-150 ease-in-out sm:text-sm sm:leading-5" %>
          </div>
        </div>

        <div class="mt-6">
          <%= f.label :password, class: "block text-sm font-medium leading-5 text-gray-700" %>
          <div class="mt-1 rounded-md shadow-sm">
            <%= f.password_field :password, class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md placeholder-gray-400 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 transition duration-150 ease-in-out sm:text-sm sm:leading-5" %>
          </div>
        </div>


        <div class="mt-6">
          <span class="block w-full rounded-md shadow-sm">
            <%= f.button t("sign_up"), class: "w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:border-indigo-700 focus:shadow-outline-indigo active:bg-indigo-700 transition duration-150 ease-in-out", type: 'submit', data: {disable_with: disable_with_spinner(t("sign_up"))} %>
          </span>
        </div>
      <% end %>

      <div class="mt-6">

        <div class="mt-6">
          <p class="text-left text-base leading-6 font-medium text-gray-500">
            <%= t("already_have_account?") %>
            <%= link_to t("sign_in"), new_session_path, class: "text-indigo-600 hover:text-indigo-500 transition ease-in-out duration-150" %>
          </p>
        </div>
      </div>

    </div>
  </div>
</div>