<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <!-- <script src="script/jquery.js"></script> -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.form/3.51/jquery.form.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.23/css/jquery.dataTables.css">
    <script src="https://unpkg.com/js-image-zoom/js-image-zoom.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/js-image-zoom/js-image-zoom.min.js"></script>
    <link rel="icon" href="images/ps2.png">
    <title>Perfect Store</title>
    <style>
        .hov:hover {
            transition: transform .2s ease-out;
            transform: scale(1.1);
            border: white 1px solid;
            border-radius: 10px;
        }
        
        .btn:hover {
            transition: transform .2s ease-out;
            transform: scale(1.1);
            border-radius: 5px;
        }
    </style>
</head>

<body>

    <nav class="navbar navbar-expand-lg navbar-light " class="row" style="background-color: #18bc9c;">
        <div class="col-sm-1">

        </div>
        <div class="col-sm-8 ">
            <a class="navbar-brand" href="/Home.html"><img style="width: 35px;" src="images/ps2.png" alt="ps"><b>   Perfect Store</b></a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        </div>
        <div class="collapse navbar-collapse" id="navbarSupportedContent" class="col-sm-3 ">
            <ul class="navbar-nav ">
                <li class="nav-item active">
                    <a class="nav-link" href="/shop.html">Shop <span class="sr-only">(current)</span></a>
                </li>

                <% if ( !user ){ %>
                    <li class="nav-item ">
                        <a class="nav-link" href="/Register.html">Register<span class="sr-only">(current)</span></a>
                    </li>
                    <li class="nav-item ">
                        <a class="nav-link" href="/login.html">Login<span class="sr-only">(current)</span></a>
                    </li>
                    <% }else{ %>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  Dashboard
                </a>
                            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                <a class="dropdown-item" href="/account.html">Account</a>
                                <% if(user.isAdmin == 1){ %>
                                    <a class="dropdown-item" href="/addproduct.html">My Products</a>
                                    <a class="dropdown-item" href="/manageusers.html">Manage users</a>
                                    <a class="dropdown-item" href="/manageorders.html">Manage Orders</a>
                                    <% } %>
                            </div>
                        </li>
                        <li class="nav-item ">
                            <a class="nav-link" href="/logout.html">Logout<span class="sr-only">(current)</span></a>
                        </li>
                        <% if(user.imgBase64){%>
                            <li>
                                <a href="/account.html"><img style="border-radius: 50%;width: 25px;height: 25px;" src="images/profile_pictures/<%=user.email%>.png" style="width: 25px;height: 25px; " alt="avatar"></a>
                            </li>
                            <%}else{%>
                                <li>
                                    <a href="/account.html"><img src="images/avatar.png" style="width: 25px;height: 25px; " alt="avatar"></a>
                                </li>
                                <%}%>
                                    <li>
                                        <a href="/cart.html"><img src="images/cart.png" style="width: 25px;height: 25px; " alt="cart"></a>
                                    </li>

                                    <% } %>

            </ul>

        </div>
    </nav>