{% extends "freeform/submissions/edit.twig" %}
{% import "_includes/forms" as forms %}

{% set title = "{title}"|t('freeform', {title: title}) %}
{% set selectedSubnavItem = "spam" %}
{% set saveShortcutRedirect = 'freeform/spam/{id}' %}
{% set fullPageForm = true %}
{% set actionUrl = 'freeform/spam-submissions/allow' %}
{% set redirectUrl = 'freeform/spam' %}

{% if isCraft5 and selectableSites|default([])|length %}
  {% set rootCrumb = {
    label: selectedSite.name,
    url: url('freeform'),
    icon: earthIcon,
    menu: {
      label: 'Select site',
      items: selectableSites,
    }
  } %}
{% else %}
  {% set rootCrumb = { label: craft.freeform.name, url: url('freeform') } %}
{% endif %}

{% set crumbs = [
    rootCrumb,
    { label: craft.freeform.name, url: url('freeform') },
    { label: "Forms"|t("freeform"), url: url('freeform/forms') },
    { label: submission.form.name, url: url('freeform/forms/' ~ submission.form.id) },
    { label: "Spam"|t('freeform'), url: url('freeform/spam') },
] %}

{% if not isCraft5 %}
  {% set contextMenu %}
    {% include '_includes/revisionmenu' with {element: submission, showDrafts: false, hasMoreRevisions: false} %}
  {% endset %}
{% endif %}

{% block actionButton %}
    <div class="btngroup submit">
        <button type="button" class="btn" id="delete-button" data-id="{{ submission.id }}">
            {{ 'Delete'|t('freeform') }}
        </button>
    </div>
    <div class="btngroup submit">
        <input type="submit" class="btn submit" value="{{ 'Allow'|t('freeform') }}">
    </div>
{% endblock %}
