<% results.each do |result| %> <% case result[:type] %> <% when "item" %>

You got <%= result[:quantity] %> <%= link_to result[:item].name, item_path(result[:item])%>. <% if result[:xp]&.any? %> (<%= result[:xp].map { |award| "#{award[:amount] * result[:quantity]} #{award[:skill].name} XP" }.join(", ") %>) <% end %>

<% when "hearth_amenity" %>

You constructed <%= result[:hearth_amenity].name %>.

<% when "hearth_planting" %>

You planted <%= link_to result[:hearth_planting].item.name, item_path(result[:hearth_planting].item) %> in the loam.

<% when "activity" %>

You realized how to <%= result[:activity].name %>!

<% when "monster" %>

You encountered a <%= result[:monster].name %>.

<%= result[:monster].description %>

<% when "monster_spawn" %>

You found the <%= result[:monster_spawn].monster.name %>!

<%= result[:monster_spawn].monster.description %>

<% when "xp" %>

You gained <%= result[:xp] %> <%= result[:skill].name %> XP.

<% when "title" %>

You earned the title <%= render "application/components/text/title", title: result[:title] %>!

<% when "condition" %>

You gained the <%= result[:condition].name %> condition.

<% when "message" %>

<%= result[:body] %>

<% when "warning" %>

<%= result[:message] %>

<% when "error" %>

<%= result[:message] %>

<% when "br" %>
<% end %> <% end %>