<%= render component('ui/forms/search/result').new do %>
  <% if @customer %>
    <%= form_for(@order, url: solidus_admin.order_path(@order), html: {
      "data-controller": "readonly-when-submitting",
      class: "flex items-center",
    }) do |f| %>
      <%= hidden_field_tag("#{f.object_name}[user_id]", @customer.id) %>
      <button type="submit" class="flex gap-2 grow items-center">
        <%= render component("ui/icon").new(name: "user-line", class: 'w-5 h-5 m-2') %>
        <div  class="flex-col text-left">
          <div class="leading-5 text-black font-semibold text-sm"><%= @name %></div>
          <div class="leading-5 text-gray-500 font-normal text-sm"><%= @customer.email %></div>
        </div>
      </button>
    <% end %>
  <% end %>
<% end %>
