<%= (@submission.template_submitters || @submission.template.submitters).find { |e| e['uuid'] == submitter&.uuid }&.dig('name') || "#{(index + 1).ordinalize} Submitter" %>
<% if submitter&.name.present? %>
<%= svg_icon('user', class: 'w-5 h-5') %>
<%= submitter&.name %>
<% end %>
<% if submitter&.email.present? %>
<%= svg_icon('mail', class: 'w-5 h-5') %>
<%= submitter.email || 'N/A' %>
<% end %>
<% if submitter&.phone.present? %>
<%= svg_icon('phone', class: 'w-5 h-5') %>
<%= submitter.phone %>
<% end %>
<%= svg_icon('writing', class: 'w-5 h-5') %>
<%= submitter&.completed_at? ? l(submitter.completed_at.in_time_zone(current_account.timezone), format: :long, locale: current_account.locale) : 'Not completed yet' %>
<% if submitter && submitter.email && !submitter.completed_at && can?(:update, submitter) %>
<%= button_to button_title(title: submitter.sent_at? ? 'Re-send Email' : 'Send Email', disabled_with: 'Sending'), submitter_send_email_index_path(submitter_slug: submitter.slug), class: 'btn btn-sm btn-primary w-full' %>
<% end %>
<% if submitter && submitter.phone && !submitter.completed_at && can?(:update, submitter) %>
<%= render 'send_sms_button', submitter: %>
<% end %>
<% if submitter && !submitter.completed_at? && can?(:create, submitter) %>
<% end %>