{% from "macros.html" import show_dataset %}
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
        <meta name="description" content="" />
        <meta name="author" content="" />
        <title>{{ project.name }}</title>
        <!-- Favicon-->
        <link rel="icon" type="image/x-icon" href="/static/assets/favicon.ico" />
        <!-- Bootstrap icons-->
        <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css" rel="stylesheet" />
        <!-- Core theme CSS (includes Bootstrap)-->
        <link href="/static/css/styles.css" rel="stylesheet" />
    </head>
    <body class="d-flex flex-column h-100">
        <main class="flex-shrink-0">
            <!-- Navigation-->
            {% include 'navigation.html' %}
            {% include 'flash.html' %}
            <!-- Page Content-->
            <section class="py-5">
                <div class="container px-5 my-5">
                    <div class="text-center mb-5">
                        <h1 class="fw-bolder">{{ project.name }}</h1>
                        <p class="lead fw-normal text-muted mb-0">Datasets</p>
                    </div>
                    <div class="row gx-5">
                            <!-- FAQ Accordion 1-->
                            <!-- <h2 class="fw-bolder mb-3">Account &amp; Billing</h2> -->
                            <div class="accordion mb-5" id="accordionExample">
                                {% for dataset in project.datasets %}
                                   {{ show_dataset(dataset, current_user) }} 
                                {% endfor %}
                            </div>
                        <a href="/dataset/import/{{ project.id }}" class="btn btn-outline-success">Add dataset</a>

                    </div>
                    <br>

                    <div class="row gx-5">
                        <form action="/project/delete" method="POST" id="delete" hidden>
                            <input name="project_id" value="{{ project.id }}" hidden/>
                        </form>
                        <input type="submit" form="delete" class="btn btn-outline-danger" value="Delete project"></input>
                        
                    </div>
                </div>
            </section>
        </main>
        <!-- Bootstrap core JS-->
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    </body>
</html>
