{% extends "bussdcc_framework/bootstrap/layout.html" %}

{% block title %}Device Manager{% endblock %}
{% block app_name %}device-manager{% endblock %}
{% block body_class %}bg-light{% endblock %}

{% block scripts %}
  {{ super() }}
  {% include "bussdcc_framework/socketio/_socketio.html" %}
  {% include "bussdcc_framework/client/_client.html" %}
  <script src="{{ url_for('bussdcc_framework_formtree.static', filename='formtree.js') }}"></script>
{% endblock %}

{% block nav %}
  <nav class="navbar navbar-expand-lg navbar-dark bg-primary" data-bs-theme="dark">
    <div class="container">
      <a class="navbar-brand" href="{{ url_for("index") }}">Device Manager</a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav me-auto mb-2 mb-lg-0">
          <li class="nav-item">
            <a class="nav-link {{ "active" if request.blueprint == "settings" }}" aria-current="page" href="{{ url_for("settings.index") }}">Settings</a>
          </li>
          <li class="nav-item">
            <a class="nav-link {{ "active" if request.blueprint == "bussdcc_system_devices" }}" aria-current="page" href="{{ url_for("bussdcc_system_devices.index") }}">Devices</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>
{% endblock %}
