<!--

    Queue - A Queueing system that can be used to handle labs in higher education
    Copyright (C) 2016-2024  Delft University of Technology

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <!--@thymesVar id="dto" type="nl.tudelft.queue.dto.patch.LabPatchDTO"-->
    <!--@thymesVar id="lab" type="nl.tudelft.queue.model.labs.Lab"-->

    <!--@thymesVar id="clusters" type="java.util.List<nl.tudelft.labracore.api.dto.ClusterSummaryDTO>"-->
    <!--@thymesVar id="divisions" type="java.util.List<nl.tudelft.labracore.api.dto.ModuleDivisionSummaryDTO>"-->

    <body>
        <th:block th:object="${dto}">
            <th:block th:fragment="nav">
                <button type="button" role="tab" aria-controls="session-tab" aria-selected="false">
                    <i class="fa fa-clock"></i>
                    Session Timing
                </button>
                <button type="button" role="tab" aria-controls="experimental-tab" aria-selected="false">
                    <i class="fa fa-flask"></i>
                    Experimental
                </button>
            </th:block>

            <th:block th:fragment="tabs">
                <div id="session-tab" role="tabpanel" hidden>
                    <div class="grid col-2 align-center gap-3" style="--col-1: minmax(0, 12rem)">
                        <label for="end-of-lab-gp-input">End of session grace period:</label>
                        <div>
                            <input
                                id="end-of-lab-gp-input"
                                class="textfield"
                                min="0"
                                max="180"
                                type="number"
                                name="eolGracePeriod"
                                th:value="${lab.eolGracePeriod}" />
                        </div>
                    </div>
                </div>

                <div id="experimental-tab" hidden>
                    <div>
                        <input id="bilingual-toggle" type="checkbox" name="isBilingual" th:checked="${lab.isBilingual}" />
                        <label for="bilingual-toggle">Enable bilingual requests</label>
                    </div>
                    <div>
                        <input id="experimental-toggle" type="checkbox" name="enableExperimental" th:checked="${lab.enableExperimental}" />
                        <label for="experimental-toggle">Enable experimental features</label>
                    </div>
                </div>
            </th:block>
        </th:block>
    </body>
</html>
