<%# locals: (entry:) %>
<%= tag.header class: "mb-4 space-y-1" do %> <%= entry.amount.negative? ? t(".sell") : t(".buy") %>

<%= format_money entry.amount_money %> <%= entry.currency %>

<%= I18n.l(entry.date, format: :long) %> <% end %> <% trade = entry.account_trade %>
<%= disclosure t(".overview") do %>
<%= t(".symbol_label") %>
<%= trade.security.ticker %>
<% if trade.qty.positive? %>
<%= t(".purchase_qty_label") %>
<%= trade.qty.abs %>
<%= t(".purchase_price_label") %>
<%= format_money trade.price_money %>
<% end %> <% if trade.security.current_price.present? %>
<%= t(".current_market_price_label") %>
<%= format_money trade.security.current_price %>
<% end %> <% if trade.qty.positive? && trade.unrealized_gain_loss.present? %>
<%= t(".total_return_label") %>
<%= render "shared/trend_change", trend: trade.unrealized_gain_loss %>
<% end %>
<% end %>