<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTTP Messages - Profile</title>
    <link rel="stylesheet" href="./styles.css">
    <script defer src="./client.bundle.js"></script>
    <!-- Additional chunks will be loaded automatically -->
</head>
<body>
    <!-- Navigation bar container - content will be injected by navbar.ts -->
    <div id="navbarContainer" class="top-nav">
        <!-- Navbar content will be injected here -->
    </div>
    
    <!-- Main Content -->
    <div class="content">
        <div class="info-box">
            <p>View and manage your Nostr profile information. Connect with a NIP-07 extension or enter your keys manually.</p>
        </div>
        <h2>Your Nostr Identity</h2>
        <div id="connectionStatus" class="connection-status-indicator" hidden>
            Not connected to any extension
        </div>
        </div>
        
        <div id="profileContainer" class="profile-container hidden">
            <h2>Profile Information</h2>
            
            <div class="profile-card">
                <div class="profile-header">
                    <div id="profilePicture" class="profile-picture">
                        <!-- Default placeholder image -->
                        <div class="profile-placeholder">👤</div>
                    </div>
                    <div class="profile-basic-info">
                        <h3 id="profileName">Unknown User</h3>
                        <div id="profileNip05" class="profile-nip05"></div>
                    </div>
                </div>
                
                <div class="profile-details">
                    <div class="profile-detail-item">
                        <strong>Pubkey (hex):</strong>
                        <div id="profilePubkeyHex" class="profile-value profile-key"></div>
                    </div>
                    <div class="profile-detail-item">
                        <strong>Pubkey (npub):</strong> 
                        <div id="profilePubkeyNpub" class="profile-value profile-key"></div>
                    </div>
                    <div class="profile-detail-item">
                        <strong>About:</strong>
                        <div id="profileAbout" class="profile-value"></div>
                    </div>
                </div>
                
                <div class="profile-footer">
                    <button id="refreshProfileBtn" class="refresh-profile-btn">Refresh Profile</button>
                    <button id="copyNpubBtn" class="copy-npub-btn">Copy npub</button>
                </div>
            </div>
            
            <div class="profile-stats">
                <h3>HTTP Messaging Stats</h3>
                <div class="stats-container">
                    <div class="stat-item">
                        <div class="stat-value" id="requestsSent">0</div>
                        <div class="stat-label">Requests Sent</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value" id="responsesReceived">0</div>
                        <div class="stat-label">Responses Received</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value" id="relaysConnected">0</div>
                        <div class="stat-label">Relays</div>
                    </div>
                </div>
            </div>
            
            <div class="qr-section">
                <h3>Your npub QR Code</h3>
                <div id="npubQrCode" class="npub-qr-code"></div>
                <p class="qr-caption">Scan this QR code to share your Nostr public key</p>
            </div>
        </div>
    </div>
    
    <!-- Scripts are now loaded as chunks by webpack -->
</body>
</html>