<div>
  <span class="ftr-text--l">{{ text_checkout_payment_method }}</span>
  {% if error_warning %}
    <div class="ftr-text--grey">{{ error_warning }}</div>
  {% endif %}
    {% if payment_methods %}
      <p class="ftr-text--grey ftr-out-space--v-m">{{ text_payment_method }}</p>
      {% for payment_method in payment_methods %}
        {% if payment_method.quote is defined %}
          {% for key, quote in payment_method.quote %}
            <input class="ftr-radio" id="{{ quote.code }}-{{ key }}" type="radio" name="payment_method"
                  value="{{ quote.code }}" data-code-type="{{ key }}" {{ (quote.selected is defined) ? 'checked' : '' }}>
            <label class="ftr-radio-label ftr-out-space--t-n ftr-block {{ (error_payment_method) ? 'error' : '' }}"
                  for="{{ quote.code }}-{{ key }}">
              <span class="ftr-radio-label__text">{{ quote.title }} {{ quote.text }}</span>
            </label>
          {% endfor %}
        {% else %}
          <input class="ftr-radio" id="{{ payment_method.code }}" type="radio" name="payment_method"
                value="{{ payment_method.code }}" {{ (payment_method.selected is defined) ? 'checked' : '' }}>
          <label class="ftr-radio-label ftr-out-space--t-n ftr-block {{ (error_payment_method) ? 'error' : '' }}"
                for="{{ payment_method.code }}">
            <span class="ftr-radio-label__text">{{ payment_method.title }} {{ payment_method.text }}</span>
          </label>
        {% endif %}
      {% endfor %}
    {% endif %}
  <label class="ftr-field  {{ (error_comment) ? 'error' : '' }}">
    <textarea id="comment" name="comment" rows="4" class="ftr-field__entry ftr-js-field__entry"
              data-value="{{ comment }}">{{ comment }}</textarea>
    <span class="ftr-field__text">{{ text_comments }}</span>
    {% if error_comment %}
      <span class="ftr-field__error">{{ error_comment }}</span>
    {% endif %}
  </label>
  {% if text_agree %}
    <input class="ftr-check" id="agree" type="checkbox" name="agree" value="1" required {{ (agree) ? 'checked' : '' }}>
    <label class="ftr-check-label" for="agree">
      <span class="ftr-check-label__text">{{ text_read_agree }} </span>
      {% if error_agree %}
        <span class="ftr-check-label__error">{{ error_agree }}</span>
      {% endif %}
    </label>
    <a href="{{ agree_link }}" class="ftr-text--primary ftr-js-swipe-content-display ftr-js-privacy-policy">{{ text_privacy_policy }}</a>
    <div class="ftr-swipe-content ftr-js-swipe-content ftr-background--light">
      <div class="ftr-grid ftr-grid--middle ftr-grid--start ftr-in-space--n">
        <i class="material-icons ftr-in-space--m ftr-in-space--v-l ftr-js-close ftr-text--bold">&#xE5CD;</i>
        <span class="ftr-text--bold">{{ text_privacy_policy }}</span>
      </div>
      <hr>
      <div class="ftr-swipe-content__main ftr-js-privacy-policy-container"></div>
    </div>
  {% endif %}

  {% if feedback_order_status %}
  <input class="ftr-check ftr-js-feedback-entry" type="checkbox" id="feedback_order" name="feedback_order" value="1">
  <label class="ftr-check-label ftr-block" for="feedback_order">
    <span class="ftr-check-label__text">{{ text_feedback_order_status }}</span>
  </label>

  <label class="ftr-field ftr-hidden ftr-js-feedback-cellphone">
    <input type="tel" name="feedback_order_whatsapp" class="ftr-field__entry ftr-js-field__entry mask-celular" value="{{ customer_celular }}">
    <span class="ftr-field__text">{{ text_whatsapp_number }}</span>
  </label>
  {% endif %}
</div>

<script>
  if (typeof loadSpecificSources != 'undefined') {
    loadSpecificSources({
      scripts: {{ scriptsApp }}
    });
  }
</script>
