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

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title> Utrade </title>
        <link rel="stylesheet" href="/css/main.css">
    </head>

    <body>
        <div class="backdrop"></div>
            <header class="main-header">
                <button id="side-menu-toggle">Menu</button>
                <nav class="main-header__nav">
                    <ul class="main-header__item-list">
                        <li class="main-header__item">
                            <a class="<%= path === '/' ? 'active' : '' %>" href="/">Utrade</a>
                        </li>
                        <% if (isAuthenticated) { %>
                            <li class="main-header__item">
                                <a class="<%= path === '/products' ? 'active' : '' %>" href="/products">Operar</a>
                            </li>
                            <li class="main-header__item">
                                <a class="<%= path === '/cart' ? 'active' : '' %>" href="/cart">Patrimonio</a>
                            </li>
                            <li class="main-header__item">
                                <a class="<%= path === '/orders' ? 'active' : '' %>" href="/orders">Historial de ordenes</a>
                            </li>
                            <li class="main-header__item">
                                <a class="<%= path === '/admin/add-product' ? 'active' : '' %>" href="/admin/add-product"> Configuraci√≥n</a>
                            </li>
                        <% } %>
                    </ul>
                    <ul class="main-header__item-list">
                        <% if (!isAuthenticated) { %>
                            <li class="main-header__item">
                                <a class="<%= path === '/login' ? 'active' : '' %>" href="/login">Login</a>
                            </li>
                            <li class="main-header__item">
                                <a class="<%= path === '/signup' ? 'active' : '' %>" href="/signup">Signup</a>
                            </li>
                        <% } else { %>
                            <li class="main-header__item">
                                <form action="/logout" method="post">
                                    <button type="submit">Logout</button>
                                </form>
                            </li>
                        <% } %>
                    </ul>
                </nav>
            </header>






    </body>
