<%# locals: (import:) %> <% dry_run = import.dry_run %> <% resources_with_counts = dry_run.select { |_, count| count > 0 }.filter_map { |key, count| [dry_run_resource(key), count] if dry_run_resource(key) } %> <% import_summary_empty = resources_with_counts.empty? %>

<%= t(".title") %>

<%= t(".description") %>

<%= t(".summary_item_label") %>

<%= t(".summary_count_label") %>

<% if import_summary_empty %>

<%= t(".empty_summary") %>

<% else %> <% resources_with_counts.each_with_index do |(resource, count), index| %>
<%= tag.div class: class_names(resource.bg_class, resource.text_class, "w-8 h-8 rounded-full flex justify-center items-center") do %> <%= icon resource.icon, color: "current" %> <% end %>

<%= resource.label %>

<%= count %>

<% unless index == resources_with_counts.length - 1 %> <%= render "shared/ruler" %> <% end %> <% end %> <% end %>
<% if import_summary_empty %> <%= render DS::Button.new(text: t(".back_to_imports"), href: imports_path, variant: :secondary, full_width: true) %> <% else %> <%= render DS::Button.new(text: t(".publish_import"), href: publish_import_path(import), method: :post, full_width: true) %> <% end %>