<% 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 "xp" %>

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

<% when "title" %>

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

<% when "message" %>

<%= result[:body] %>

<% when "error" %>

<%= result[:message] %>

<% end %> <% end %>