<%# locals: { trend: } %>

<% styles = trend_styles(trend) %>

<p class="text-sm <%= styles[:text_class] %>">
  <% if trend.direction.flat? %>
    <span>No change</span>
  <% else %>
    <span><%= styles[:symbol] %><%= trend.value.is_a?(Money) ? format_money(trend.value.abs) : trend.value.abs.round(2) %></span>
    <% unless trend.percent.infinite? %>
      <span>(<%= lucide_icon(styles[:icon], class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent.abs %>%)</span>
    <% end %>
  <% end %>
</p>
