{% extends 'base/layout.html' %}
{% load buttons %}
{% load i18n %}
{% load helpers %}
{% load static %}

{% block title %}
  Data Mapping
{% endblock %}

{% block header %}
  <div class="title-container px-3 py-2">

    {# Title #}
    
    <div id="content-title">
      {% include "slurpit_netbox/logo.html" %}
      {# Center-align title in object-edit views #}
      <h1 class="h2 w-100">Data Mapping</h1>
      {% block subtitle %}{% endblock %}
    </div>

    {# Controls #}
    {% block controls %}{% endblock controls %}

  </div>
{% endblock header %}

{% block tabs %}
  <ul class="nav nav-tabs px-3">    
    <li class="nav-item" role="presentation">
      <a class="nav-tab nav-link {% if request.GET.tab == 'netbox_to_slurpit' or request.GET.tab is None  %}active{% endif %}" href="?tab=netbox_to_slurpit">
        NetBox to Slurp’it
      </a>
    </li>

    <li class="nav-item" role="presentation">
      <a class="nav-tab nav-link {% if request.GET.tab == 'slurpit_to_netbox' %}active{% endif %}" href="?tab=slurpit_to_netbox">
        Slurp’it to NetBox
      </a>
    </li>

  </ul>
{% endblock tabs %}

{% block content-wrapper %}
  <div class="tab-content sub-tab-content">
    {% if request.GET.tab == 'slurpit_to_netbox'  %}
      {% include "slurpit_netbox/mapping/slurpit_to_netbox.html" %}
    {% elif request.GET.tab == 'netbox_to_slurpit' or request.GET.tab is None %}
      {% include "slurpit_netbox/mapping/netbox_to_slurpit.html" %}
    {% endif %}
  </div> 

{% endblock content-wrapper %}





<footer class="footer container-fluid">
  {% block footer %}
    <div class="row align-items-center justify-content-between mx-0">

      <div class="col-sm-12 col-md-auto fs-4 noprint">
        <nav class="nav justify-content-center justify-content-lg-start">
          {% block footer_links %}
            <a type="button" class="nav-link h6" href="https://slurpit.io" target="_blank">
              https://slurpit.io
            </a>
          {% endblock footer_links %}
        </nav>
      </div>

      <div class="col-sm-12 col-md-auto text-center text-lg-end text-muted"  >
        <span class="d-block d-md-inline">{% annotated_now %} {% now 'T' %}</span>
        <span class="ms-md-3 d-block d-md-inline">{{ settings.HOSTNAME }} (v{{ settings.VERSION }})</span>
        <span class="ms-md-3 d-block d-md-inline">Slurpit(v{{ settings.PLUGINS_CONFIG.slurpit_netbox.version }})</span>
      </div>

    </div>
  {% endblock footer %}
</footer>

