<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WaifuBoard - Marketplace</title>
    <link rel="stylesheet" href="/views/css/globals.css">
    <link rel="stylesheet" href="/views/css/components/navbar.css">
    <link rel="stylesheet" href="/views/css/marketplace.css">
    <link rel="stylesheet" href="/views/css/components/updateNotifier.css">
    <link rel="icon" href="/public/assets/waifuboards.ico" type="image/x-icon">
    <link rel="stylesheet" href="/views/css/components/titlebar.css">
</head>
<body>
<div id="titlebar">
    <div class="title-left">
        <img class="app-icon" src="/public/assets/waifuboards.ico" alt=""/>
        <span class="app-title">WaifuBoard</span>
    </div>
    <div class="title-right">
        <button class="min">—</button>
        <button class="max">🗖</button>
        <button class="close">✕</button>
    </div>
</div>

<div class="hero-spacer"></div>

<main>
    <section class="section">
        <header class="section-header">
            <div class="tabs-container">
                <button class="tab-button active" data-tab="marketplace">Marketplace</button>
                <button class="tab-button" data-tab="installed">My Extensions</button>
            </div>

            <div class="filter-controls">
                <button id="btn-update-all" class="btn-blur hidden" style="margin-right: 10px; width: auto; padding: 0 15px;">
                    Update All
                </button>
                <label for="extension-filter" class="filter-label">Filter by Type:</label>
                <select id="extension-filter" class="filter-select">
                    <option value="All">All Categories</option>
                    <option value="image-board">Image Boards</option>
                    <option value="anime-board">Anime Boards</option>
                    <option value="book-board">Book Boards</option>
                    <option value="Local">Local/Manual</option>
                </select>
            </div>
        </header>

        <div id="marketplace-content">
        </div>
    </section>

    <div id="customModal" class="modal-overlay hidden">
        <div class="modal-content">
            <h3 id="modalTitle"></h3>
            <p id="modalMessage"></p>
            <div class="modal-actions">
                <button id="modalConfirmButton" class="modal-button btn-uninstall hidden">Confirm</button>
                <button id="modalCloseButton" class="modal-button btn-install">OK</button>
            </div>
        </div>
    </div>
</main>

<script src="/src/scripts/utils/notification-utils.js"></script>
<script src="/src/scripts/updateNotifier.js"></script>
<script src="/src/scripts/marketplace.js"></script>
<script src="/src/scripts/titlebar.js"></script>
<script src="/src/scripts/rpc-inapp.js"></script>
<script src="/src/scripts/auth-guard.js"></script>
</body>
</html>