<%= render DS::Dialog.new do |dialog| %>
  <% dialog.with_header(title: t("accounts.confirm_unlink.title")) %>

  <% dialog.with_body do %>
    <p class="text-secondary text-sm mb-4">
      <%= t("accounts.confirm_unlink.description_html", account_name: @account.name, provider_name: @account.provider_name) %>
    </p>

    <div class="mb-4 p-3 bg-yellow-50 border border-yellow-200 rounded-lg">
      <div class="flex items-start gap-2">
        <%= icon "alert-triangle", class: "w-4 h-4 text-yellow-600 mt-0.5 flex-shrink-0" %>
        <div class="text-xs">
          <p class="font-medium text-yellow-900 mb-1"><%= t("accounts.confirm_unlink.warning_title") %></p>
          <ul class="text-yellow-700 list-disc list-inside space-y-1">
            <li><%= t("accounts.confirm_unlink.warning_no_sync") %></li>
            <li><%= t("accounts.confirm_unlink.warning_manual_updates") %></li>
            <li><%= t("accounts.confirm_unlink.warning_transactions_kept") %></li>
            <li><%= t("accounts.confirm_unlink.warning_can_delete") %></li>
          </ul>
        </div>
      </div>
    </div>

    <%= render DS::Button.new(
      text: t("accounts.confirm_unlink.confirm_button"),
      href: unlink_account_path(@account),
      method: :delete,
      full_width: true,
      data: { turbo_frame: "_top" }) %>
  <% end %>
<% end %>
