<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Admin</title>
    <link rel="stylesheet" href="/static/css/admin.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
</head>
<body>
    <main>
        <nav>
            <button class="tab-button" id="1">Image Upload</button>
            <button class="tab-button" id="2">Images</button>
        </nav>
        
        <div class="tab-container active" id="tab-1">
            <div class="container" style="max-width: 400px;">
                <h2>Add New Image</h2>
                <form id="imageForm" enctype="multipart/form-data">
                    <label for="imageInput">Select Image:</label>
                    <input type="file" id="imageInput" name="image" accept="image/*" required><br>
                    <button type="submit" style="width: 100%;">Upload</button>
                </form>
                <img id="preview" class="preview" alt="Image Preview">
            </div>
        </div>
        <div class="tab-container" id="tab-2">
            <h1>
                Images <button id="refresh-gallery">Refresh</button>
            </h1>
            <div>
                <table id="imagesGallery">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Image</th>
                            <th>Spice lvl</th>
                        </tr>
                    </thead>
                    <tbody>
                        
                    </tbody>
                </table>
            </div>
        </div>
    </main>
    <script src="/static/js/admin.js"></script>
    <script src="/static/js/image_upload.js"></script>
    <script src="/static/js/images.js"></script>
</body>
</html>