%= turbo_frame_tag "modal" do %>
<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title", account_name: @account.name)) %>
<% dialog.with_body do %>
<%= t(".description") %>
<%= form_with url: link_existing_account_sophtron_items_path,
method: :post,
class: "space-y-4",
data: { turbo_frame: "_top" } do %>
<%= hidden_field_tag :account_id, @account.id %>
<%= hidden_field_tag :return_to, @return_to %>
<% @available_accounts.each do |account| %>
<% has_blank_name = account[:account_name].blank? %>
<% end %>
<%= render DS::Link.new(
text: t(".cancel"),
href: @return_to || accounts_path,
variant: :secondary,
data: { turbo_frame: "_top", action: "click->DS--dialog#close" }
) %>
<%= render DS::Button.new(text: t(".link_account"), type: "submit") %>
<% end %>
<% end %>
<% end %>
<% end %>