{% extends 'generic/object.html' %}
{% load helpers %}
{% load plugins %}
{% load i18n %}

{% block content %}
  <div class="row">
    <div class="col col-12 col-md-6">
      <div class="card">
        <h2 class="card-header">{% trans "Route Target" %}</h2>
        <table class="table table-hover attr-table">
          <tr>
            <th scope="row">{% trans "Name" %}</th>
            <td class="font-monospace">{{ object.name }}</td>
          </tr>
          <tr>
            <th  scope="row">{% trans "Tenant" %}</th>
            <td>{{ object.tenant|linkify|placeholder }}</td>
          </tr>
          <tr>
            <th scope="row">{% trans "Description" %}</th>
            <td>{{ object.description|placeholder }}</td>
          </tr>
        </table>
      </div>
      {% include 'inc/panels/tags.html' %}
      {% plugin_left_page object %}
    </div>
    <div class="col col-12 col-md-6">
      {% include 'inc/panels/custom_fields.html' %}
      {% include 'inc/panels/comments.html' %}
      {% plugin_right_page object %}
    </div>
  </div>
  <div class="row mb-3">
    <div class="col col-12 col-md-6">
      <div class="card">
        <h2 class="card-header">{% trans "Importing VRFs" %}</h2>
        {% htmx_table 'ipam:vrf_list' import_target_id=object.pk %}
      </div>
    </div>
    <div class="col col-12 col-md-6">
      <div class="card">
        <h2 class="card-header">{% trans "Exporting VRFs" %}</h2>
        {% htmx_table 'ipam:vrf_list' export_target_id=object.pk %}
      </div>
    </div>
  </div>
  <div class="row mb-3">
    <div class="col col-12 col-md-6">
      <div class="card">
        <h2 class="card-header">{% trans "Importing L2VPNs" %}</h2>
        {% htmx_table 'vpn:l2vpn_list' import_target_id=object.pk %}
      </div>
    </div>
    <div class="col col-12 col-md-6">
      <div class="card">
        <h2 class="card-header">{% trans "Exporting L2VPNs" %}</h2>
        {% htmx_table 'vpn:l2vpn_list' export_target_id=object.pk %}
      </div>
    </div>
  </div>
  <div class="row">
    <div class="col col-md-12">
      {% plugin_full_width_page object %}
    </div>
  </div>
{% endblock %}
