{{ header }}

<div class="background-white bottom-margin-large">
  <div class="container-fluid">
    <div class="row no-space-xs">
      <div class="col-xs-12">
        <div class="content-box vertical-padding-large flex between-xs middle-xs js-header-notifications">
          <div>
            <span class="text-x-large text-dark">{{ heading_title }}</span>
            <div class="adm-breadcrumb">
              {% for breadcrumb in breadcrumbs %}
                <i class="fas fa-angle-right text-x-small text-gray horizontal-padding-small"></i>
                <a href="{{ breadcrumb.href }}" class="text-x-small text-gray text-decoration-none">{{ breadcrumb.text }}</a>
              {% endfor %}
            </div>
          </div>
          <div class="flex flex-row middle-xs">
            <a href="{{ insert }}" class="btn-default btn-medium btn-white right-margin-small">
            <span>{{ button_adicionar }}</span>
            </a>
            <a href="{{ cancel }}" class="btn-default btn-medium right-margin-small">
              <span>{{ button_cancel }}</span>
            </a>
            <button type="button" class="btn-default btn-medium btn-primary js-submit-main-form">
              <span>{{ button_save }}</span>
            </button>
          </div>
          {% if error_warning %}<div class="warning full-width top-margin-small">{{ error_warning }}</div>{% endif %}
          {% if success %}<div class="success full-width top-margin-small">{{ success }}</div>{% endif %}
        </div>
      </div>
    </div>
  </div>
</div>

<div class="container-fluid">
  <div class="row">
    <div class="col-xs-12 col-md-8">
      {% if redirecionamentos is defined %}
        {% for redirecionamento in redirecionamentos %}
          <div class="content-box background-white shadow-small hover:shadow-large bottom-margin-small flex middle-xs">
            <a href="{{ redirecionamento.url_edit }}" class="visible-inline-block text-decoration-none" style="width:calc(100% - 48px);">
              <div class="row no-space-xs middle-xs vertical-padding-large left-padding-large">
                <div class="col-xs-12">
                  <div class="content-box text-word-wrap">
                    <span class="text-small text-dark">{{ text_link_invalido }}</span>
                    <span class="text-x-small text-gray visible-block">{{ redirecionamento.link_origem }}</span>
                  </div>
                </div>
                <div class="col-xs-12">
                  <div class="content-box text-word-wrap top-padding-small">
                    <span class="text-small text-dark">{{ text_link_redirecionamento }}</span>
                    <span class="text-x-small text-gray visible-block">{{ redirecionamento.link_destino }}</span>
                  </div>
                </div>
              </div>
            </a>
            <div class="new-dropdown visible-inline-block js-new-dropdown">
              <div class="new-dropdown-control">
                <span class="new-dropdown-control-dot"></span>
                <span class="new-dropdown-control-dot"></span>
                <span class="new-dropdown-control-dot"></span>
              </div>
              <div class="new-dropdown-content background-white border-gray shadow-medium right js-new-dropdown-content">
                <a href="{{ redirecionamento.url_delete }}" class="new-dropdown-content-item text-small text-error text-decoration-none">{{ text_delete }}</a>
              </div>
            </div>
          </div>
        {% endfor %}
        <div class="row top-margin-medium">
          <div class="col-xs-12">
            <div class="content-box">
              {{ pagination }}
            </div>
          </div>
        </div>
      {% else %}
        <div class="row">
          <div class="col-xs-12">
            <div class="content-box background-white shadow-small vertical-padding-x-large horizontal-padding-large text-center">
              <span class="text-medium text-gray">{{ text_no_results }}</span>
            </div>
          </div>
        </div>
      {% endif %}
    </div>
    <div class="col-xs-12 col-md-4">
      <div class="content-box background-white padding-large shadow-small">
        <form action="" method="post" class="js-main-form">
          <div class="row small-space-xs bottom-xs">
            <div class="field-group col-xs">
              <label class="field-label">{{ text_habredirecionamento301 }}</label>
              <select name="redirecionamento301_status" class="field-entry field-entry-medium">
                {% for status_item in status %}
                <option value="{{ status_item.key }}" {{ status_item.selected }}>{{ status_item.value }}</option>
                {% endfor %}
              </select>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

{{ footer }}
