<%= tag.p title, class: "text-sm font-medium text-secondary" %> <% if account.investment? %> <%= render "investments/value_tooltip", balance: account.balance_money, holdings: holdings_value_money, cash: account.cash_balance_money %> <% end %>
<%= tag.p view_balance_money.format, class: "text-primary text-3xl font-medium truncate" %> <% if converted_balance_money %> <%= tag.p converted_balance_money.format, class: "text-sm font-medium text-secondary" %> <% end %>
<%= form_with url: account_path(account), method: :get, data: { controller: "auto-submit-form" } do |form| %>
<% if account.investment? %> <%= form.select :chart_view, [["Total value", "balance"], ["Holdings", "holdings_balance"], ["Cash", "cash_balance"]], { selected: view }, class: "bg-container border border-secondary rounded-lg text-sm pr-7 cursor-pointer text-primary focus:outline-hidden focus:ring-0", data: { "auto-submit-form-target": "auto" } %> <% end %> <%= form.select :period, Period.as_options, { selected: period.key }, data: { "auto-submit-form-target": "auto" }, class: "bg-container border border-secondary rounded-lg px-3 py-2 text-sm pr-7 cursor-pointer text-primary focus:outline-hidden focus:ring-0" %>
<% end %>
<%= turbo_frame_tag dom_id(@account, :chart_details) do %>
<%= render partial: "shared/trend_change", locals: { trend: trend, comparison_label: period.comparison_label } %>
<% if series.any? %>
<% else %>

No data available

<% end %>
<% end %>