<div class="<%= stimulus_id %>">
  <%= turbo_frame_tag "edit_order_email_modal" do %>
    <%= render component("ui/modal").new(title: t(".title")) do |modal| %>
      <%= form_for @order, url: solidus_admin.order_path(@order), html: { id: form_id } do |f| %>
        <%= render component("ui/forms/field").text_field(f, :email) %>
        <label class="font-normal text-sm mt-4 block">
          <%= t('.guest_checkout') %>:
          <output class="font-semibold text-sm"><%= @order.user ? t('.no') : t('.yes') %></output>
          <%= render component('ui/toggletip').new(text: t('.guest_checkout_tip'), class: "align-middle") %>
        </label>
      <% end %>

      <% modal.with_actions do %>
        <form method="dialog">
          <%= render component("ui/button").new(scheme: :secondary, text: t('.cancel')) %>
        </form>
        <%= render component("ui/button").new(form: form_id, type: :submit, text: t('.submit')) %>
      <% end %>
    <% end %>
  <% end %>

  <%= render component("orders/show").new(order: @order) %>
</div>
