<%# locals: { trend:, comparison_label: nil } %>

<% if trend.direction.flat? %> <%= t(".no_change") %><%= " #{comparison_label}" if defined?(comparison_label) && comparison_label.present? %> <% else %> <%= trend.value.is_a?(Money) ? format_money(trend.value) : trend.value.round(2) %> <% unless trend.percent.infinite? %> (<%= icon(trend.icon, size: "sm", color: "current", class: "mb-0.5 inline") %><%= trend.percent_formatted %>) <% end %> <%= " #{comparison_label}" if defined?(comparison_label) && comparison_label.present? %> <% end %>