<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - Mango.Web</title>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
    <link rel="stylesheet" href="~/Mango.Web.styles.css" asp-append-version="true" />
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.css"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
</head>
<body>
    <header>
        <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-dark box-shadow mb-3">
            <div class="container-fluid">
                <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Mango.Web</a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse" 
                data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent" aria-expanded="false" 
                aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
                    <ul class="navbar-nav flex-grow-1">
                        <li class="nav-item">
                            <a class="nav-link" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
                        </li>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" 
                            data-bs-toggle="dropdown" aria-expanded="false"> Content Management
                            </a>
                            <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
                                <li>
                                    <a class="dropdown-item" asp-controller="Coupon" asp-action="CouponIndex">
                                        Coupon
                                    </a>
                                </li>
                                <li><hr class="dropdown-divider"></li>
                                <li>
                                    <a class="dropdown-item" asp-controller="Product" asp-action="ProductIndex">
                                        Product
                                    </a>
                                </li>
                                <li><hr class="dropdown-divider"></li>
                            </ul>                            
                        </li>
                    </ul>
                    <ul class="navbar-nav">
                        @if (!User.Identity.IsAuthenticated)
                        {
                            <li class="nav-item">
                                <a class="nav-link" asp-controller="Auth" asp-action="Login">Login</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" asp-controller="Auth" asp-action="Register">Register</a>
                            </li>
                        }
                        else
                        {
                            <li>
                                <a class="nav-link" href="#">Hello @User.Identity.Name</a>
                            </li>
                            <li>
                                <a class="nav-link" asp-controller="Auth" asp-action="Logout">Logout</a>
                            </li>
                        }
                    </ul>
                </div>
            </div>
        </nav>
    </header>
    <div class="container">
        <main role="main" class="pb-3">
            @RenderBody()
            <partial name="_Notifications" />
        </main>
    </div>

    <footer class="footer text-muted">
        <div class="text-center">
            Made with <i class="bi bi-heart-fill"></i> by a Bhrugen Patel student
        </div>
    </footer>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>    
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="~/js/site.js" asp-append-version="true"></script>
    @await RenderSectionAsync("Scripts", required: false)
</body>
</html>
