<% account = simplefin_account.current_account %> <% transaction_count = account&.entries&.where(entryable_type: "Transaction")&.count || 0 %>

<%= simplefin_account.name %> <% if simplefin_account.org_data.present? && simplefin_account.org_data['name'].present? %> • <%= simplefin_account.org_data["name"] %> <% end %>

<%= number_to_currency(simplefin_account.current_balance || 0, unit: simplefin_account.currency || "USD") %> <%= t("simplefin_items.setup_accounts.stale_accounts.transaction_count", count: transaction_count) %>

<%= t("simplefin_items.setup_accounts.stale_accounts.action_prompt") %> <% if target_accounts&.any? %>
<%= select_tag "stale_account_actions[#{simplefin_account.id}][target_account_id]", options_from_collection_for_select(target_accounts, :id, :name), class: "appearance-none bg-container border border-primary rounded-md px-2 py-1 text-sm text-primary focus:border-primary focus:ring-1 focus:ring-primary focus:outline-none ml-6 max-w-[200px] truncate disabled:opacity-50 disabled:cursor-not-allowed", disabled: true, data: { stale_account_action_target: "targetSelect" } %>
<% end %>