<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Profile of Gameramante</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
    <link rel="stylesheet" href="/css/profile.css" />
</head>
<body>
    <header>
        <nav class="navbar navbar-expand-sm navbar-dark bg-dark">
            <div class="container">
                <a class="navbar-brand" href="/">Friendo</a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
                    data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                    aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav mb-2 mb-lg-0">
                        <li class="nav-item">
                            <a class="nav-link" aria-current="page" href="/">Home</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="/search">Search</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">Contact</a>
                        </li>
                    </ul>
                    <%  %> 
                    <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
                        <li class="nav-item">
                            <a class="nav-link" href="#" onclick="logout()">Logout</a>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </header>
    <div id="container">
        <div id="profile">
            <div id="profile-intro">
                <div id="basic-info">
                    <img class="profile-picture" src="/img/default-avatar.png" width="200" height="200">
                    <p id="name"><%= firstName %> <span class="mood">‚òÅÔ∏è</span></p>
                    <p id="online-status">Currently <span id="status">Online</span></p>
                </div>
                <div id="profile-actions">
                    <ul id="profile-options">
                        <li>Photos</li>
                        <li>Posts</li>
                    </ul>
                    <div id="friendship-buttons">
                        <% if (isProfileOwner) { %>
                            <button type="button" class="btnfriendship">Edit Profile</button>
                        <% } else { %>
                            <button type="button" class="btnfriendship">Add as Friend</button>
                            <button type="button" class="btnfriendship">Send a Message</button>
                        <% } %>
                    </div>
                </div>
            </div>
            <div id="profile-description" class="separator">
                <div id="bio">
                    <p id="intro">About me:</p>
                    <p id="bioBox">N/A</p>
                    <p id="age"><i class="fas fa-birthday-cake"></i> Age: N/A</p>
                    <p id="gender">
                        <i class="fas fa-venus-mars"></i>
                        Gender: <%= gender == 1 ? "Male üë®" : "Female üë©" %>
                    </p>
                    <p id="mbti"><i class="fas fa-feather-alt"></i> MBTI: N/A</p>
                    <p id="religion"><i class="fas fa-praying-hands"></i> Religion: N/A</p>
                </div>
            </div>
        </div>
        <div id="post-section">
            <div id="posts-description" class="separator">
                <p>POSTS:</p>
            </div>
            <div class="posts">
                <section class="post-wrapper">
                    <article id="latest-pic">
                        <p class="title">My first love</p>
                        <p class="mainLikes"><i class="far fa-heart"></i> By 134 people</p>
                        <button class="btnfriendship">READ</button>
                        <div class="date">
                            <p class="">12th December 2021</p>
                        </div>
                    </article>
                </section>
            </div>
        </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
    <script src="https://kit.fontawesome.com/35e38d7da5.js" crossorigin="anonymous"></script>
    <script src="/javascript/profile.js"></script>
</body>
</html>