<!DOCTYPE html>
<!-- Created by CodingLab |www.youtube.com/CodingLabYT-->
<html lang="en" dir="ltr">
<head>
    <meta charset="UTF-8">
    <!--<title> Drop Down Sidebar Menu | CodingLab </title>-->
    <link rel="stylesheet" href="{{ asset('backend/css/admin.css') }}">

    <!-- Boxiocns CDN Link -->
    <link href='https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css' rel='stylesheet'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
    <div class="sidebar close">

        <ul class="nav-links">
            <li class="dash">
                <a href="{{url('/dashboard')}}">
                    <i class='bx bx-grid-alt'></i>
                    <span class="link_name">Dashboard</span>
                </a>

            </li>

            <li class="mt-4">
                <div class="iocn-link ">
                    <a href="{{route('presentations')}}">

                        <i class="fa-solid fa-circle-info"></i>
                        <span class="link_name">Presentation</span>

                    </a>
                   
                </div>
                <ul class="sub-menu">
                    <li><a class="link_name" href="{{route('presentations')}}">Presentation</a></li>


                </ul>
            </li>
            <li>
                <a href="{{route('slides')}}">
                    <i class="fa-solid fa-image"></i>
                    <span class="link_name">Slide</span>
                </a>
                <ul class="sub-menu blank">
                    <li><a class="link_name" href="{{route('slides')}}">Slide</a></li>
                </ul>
            </li>
            <li>
                <a href="{{route('categories')}}">
                    <i class="fa-solid fa-tags"></i>
                    <span class="link_name">Categorie</span>
                </a>
                <ul class="sub-menu blank">
                    <li><a class="link_name" href="{{route('categories')}}">Categorie</a></li>
                </ul>
            </li>

            <li>
                <a href="{{route('produits')}}">
                    <i class="fa-sharp fa-solid fa-laptop"></i>
                    <span class="link_name">Produit</span>
                </a>
                <ul class="sub-menu blank">
                    <li><a class="link_name" href="{{route('produits')}}">Produit</a></li>
                </ul>
            </li>
           
            <li>
                <a href="{{route('promotions')}}">
                    <i class="fa-sharp fa-solid fa-percent"></i>
                    <span class="link_name">Promotion</span>
                </a>
                <ul class="sub-menu blank">
                    <li><a class="link_name" href="{{route('promotions')}}">Promotion</a></li>
                </ul>
            </li>
            <li>
                <a href="{{route('contact')}}">
                    <i class="fa-solid fa-address-book"></i>
                    <span class="link_name">contact</span>
                </a>
                <ul class="sub-menu blank">
                    <li><a class="link_name" href="{{route('contact')}}">contact</a></li>
                </ul>
            </li>
            
            <li class="profile">
                <a  href="{{ route('logout') }}"
                     onclick="event.preventDefault();
                    document.getElementById('logout-form').submit();">
                     <i class='bx bx-log-out' id="log_out" ></i>
                     <span class="link_name">logout</span>

                  </a>
                  <ul class="sub-menu blank">
                    <li><a class="link_name" href="#">logout</a></li>
                </ul>
                       <form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
                              @csrf
                           </form>
            </li>
            <li>

            </li>
        </ul>
    </div>
    <section class="home-section">
        <div class="home-content">
            <i class='bx bx-menu'></i>
            <!-- <span class="text">Drop Down Sidebar</span> -->
        </div>
        <main class="py-4 container">

            @yield('content')

        </main>

    </section>
    <script>
        let arrow = document.querySelectorAll(".arrow");
        for (var i = 0; i < arrow.length; i++) {
            arrow[i].addEventListener("click", (e) => {
                let arrowParent = e.target.parentElement.parentElement; //selecting main parent of arrow
                arrowParent.classList.toggle("showMenu");
            });
        }
        let sidebar = document.querySelector(".sidebar");
        let sidebarBtn = document.querySelector(".bx-menu");
        console.log(sidebarBtn);
        sidebarBtn.addEventListener("click", () => {
            sidebar.classList.toggle("close");
        });

    </script>
</body>
</html>
