<%= render(Spina::UserInterface::ModalComponent.new) do %>
  <%= form_with model: @page, url: spina.admin_page_move_path(@page), data: {turbo_frame: "_top"} do |f| %>
  
    <div class="px-4 pt-5 sm:p-6 sm:pb-4">
      <div class="sm:flex sm:items-start">
        <div class="mt-3 w-full text-center sm:mt-0 sm:text-left">
          <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-headline">
            <%=t 'spina.pages.move_page' %>:
          </h3>
          
          <div class="mt-4 w-full">            
            <%= render Spina::Pages::LocationComponent.new(f, @page) %>
          </div>
        </div>
      </div>
    </div>
    <div class="px-4 py-6 sm:px-6 sm:flex sm:flex-row-reverse">
      <span class="flex w-full rounded-md shadow-sm sm:ml-3 sm:w-auto">
        <button type="submit" class="btn btn-primary">
          <%=t 'spina.pages.move_page' %>
          <%= heroicon('arrow-right', style: :solid, class: 'w-4 h-4 ml-1') %>
        </button>
      </span>
      <span class="mt-3 flex w-full rounded-md shadow-sm sm:mt-0 sm:w-auto">
        <button type="button" class="btn btn-default" data-action="modal#close">
          <%=t 'spina.ui.cancel' %>
        </button>
      </span>
    </div>
  
  <% end %>
<% end %>
