<%= render Components::PublicActivity::Snippet.new(activity) do %>
  <%
    verification_text = if defined?(current_user) && current_user.is_a?(Backend::User)
      link_to "verification", backend_verification_path(activity.trackable)
    else
      "verification"
    end

    is_current = defined?(current_identity) && activity.trackable&.identity == current_identity
  %>
  rejected <%= is_current ? "your" : "#{activity.trackable.identity.first_name} #{activity.trackable.identity.last_name}'s" %> <%= verification_text %><%
  reason = activity.parameters[:reason]
  if reason.present?
    reason_name = Verification::DocumentVerification::REJECTION_REASON_NAMES[reason] || reason
                                                                                                                                                       %> for <%= reason_name.downcase %><%
  end
                                                                                                                                                                                         %>.
<% end %>
