<%= render 'submissions/preview_tags' %>
<%= render 'start_form/banner' %>
<%= svg_icon('writing_sign', class: 'w-10 h-10') %>

<%= @submission.name || @submission.template.name %>

<% last_submitter = @submission.submitters.completed.order(:completed_at).last %> <% if last_submitter %>

<%= t(last_submitter.with_signature_fields? ? 'signed_on_time' : 'completed_on_time', time: l(last_submitter.completed_at.to_date, format: :long)) %>

<% end %>
<% if Docuseal.multitenant? || Accounts.can_send_emails?(@submission.account) %> <%= form_for '', url: send_submission_email_index_path, method: :post, html: { class: 'space-y-4' } do |f| %>
<%= f.hidden_field :submission_slug, value: @submission.slug %> <%= f.label :email, t('email'), class: 'label' %> <%= f.email_field :email, value: current_user&.email || params[:email], required: true, class: 'base-input', placeholder: t('send_copy_to_email') %> <% if params[:status] == 'error' %> <%= t('please_enter_your_email_address_associated_with_the_completed_submission') %> <% end %>
<%= f.button button_title(title: t('send_copy_to_email'), disabled_with: t('starting')), class: 'base-button' %> <% end %> <% if Docuseal.multitenant? %>
<%= t('or') %>
<% end %> <% end %> <% if Docuseal.multitenant? %>
<%= link_to t('create_free_account'), registration_path, class: 'white-button w-full' %>
<% end %>
<%= render 'shared/attribution', link_path: '/start', account: @submission.account %>