<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no"
          name="viewport">

    <!-- Bootstrap CSS -->
    <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}"
          rel="stylesheet">
    <title>{% block title %}{% endblock %} - Arr Cls</title>
</head>
<body>

<div class="container">

    <nav class="navbar navbar-expand-lg navbar-light bg-light">
      <a class="navbar-brand" href="#">Arrhythmia Classifier</a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarNav">
        <ul class="navbar-nav">
          <li class="nav-item">
            <a class="nav-link" href="{{ url_for('arrcls.signal_extraction') }}">Extract Signals</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="{{ url_for('arrcls.feature_extraction') }}">Feature Extraction</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="{{ url_for('arrcls.get_classifier') }}">Get Classifier</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="{{ url_for('arrcls.signal_analyzer') }}">Analize Signals</a>
          </li>
        </ul>
      </div>
    </nav>

    {% with messages = get_flashed_messages(with_categories=true) %}
        {% if messages %}
            {% for category, message in messages %}
                {% if category == 'error' %}
                    <div class="alert alert-danger alert-dismissible fade show mt-2" role="alert">
                        {{ message }}
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                {% else %}
                    <div class="alert alert-success alert-dismissible fade show mt-2" role="alert">
                        {{ message }}
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                {% endif %}
            {% endfor %}
        {% endif %}
    {% endwith %}
    {% block content %}{% endblock %}
</div>
<!-- Option 1: jQuery and Bootstrap Bundle (includes Popper) -->
<script src="{{ url_for('static', filename='js/jquery-3.5.1.slim.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
{% block custom_scripts %}{% endblock %}
</body>
</html>