
<div class="app-content">
    <!-- Header Section start -->
<!-- Header Section starts -->
<header class="header-main">
<div class="container-fluid">
    <div class="row">
        <div class="p-0 col-6 col-sm-4 d-flex align-items-center header-left">
            <span class="header-toggle me-3">
                <i class="iconoir-view-grid"></i>
            </span>
        </div>

        <div class="p-0 col-6 col-sm-8 d-flex align-items-center justify-content-end header-right">

            <ul class="d-flex align-items-center">

                

                <li class="header-language">
                    <div class="flex-shrink-0 dropdown" id="lang_selector">
                        <a aria-expanded="false" class="d-block head-icon ps-0"
                           data-bs-toggle="dropdown"
                           href="#">
                            <div class="lang-flag lang-en ">
                      <span class="overflow-hidden flag rounded-circle">
                        <i class=""></i>
                      </span>
                            </div>
                        </a>
                        <ul class="border-0 dropdown-menu language-dropdown header-card">
                            <li class="p-2 lang lang-en selected dropdown-item" data-bs-placement="top"
                                data-bs-toggle="tooltip" title="US">
                      <span class="d-flex align-items-center">
                        <i class="flag-icon flag-icon-usa flag-icon-squared b-r-10 f-s-22"></i>
                        <span class="ps-2">English</span>
                      </span>
                            </li>
                            <li class="p-2 lang lang-pt dropdown-item" title="FR">
                      <span class="d-flex align-items-center">
                        <i class="flag-icon flag-icon-fra flag-icon-squared b-r-10 f-s-22"></i>
                        <span class="ps-2">Française </span>
                      </span>
                            </li>
                            <li class="p-2 lang lang-es dropdown-item" title="UK">
                      <span class="d-flex align-items-center">
                        <i class="flag-icon flag-icon-gbr flag-icon-squared b-r-10 f-s-22"></i>
                        <span class="ps-2">English</span>
                      </span>
                            </li>
                            <li class="p-2 lang lang-es dropdown-item" title="Ru">
                      <span class="d-flex align-items-center">
                          <i class="flag-icon flag-icon-rus flag-icon-squared b-r-10 f-s-22"></i>
                        <span class="ps-2">Русская</span>
                      </span>
                            </li>
                            <li class="p-2 lang lang-es dropdown-item" title="IT">
                      <span class="d-flex align-items-center">
                        <i class="flag-icon flag-icon-ita flag-icon-squared b-r-10 f-s-22"></i>
                        <span class="ps-2">française</span>
                      </span>
                            </li>
                        </ul>
                    </div>

                </li>



                <li class="header-profile">


                    <div aria-labelledby="profilecanvasRight"
                         class="offcanvas offcanvas-end header-profile-canvas"
                         id="profilecanvasRight"
                         tabindex="-1">
                        <div class="offcanvas-body app-scroll">
                            <ul class="">
                                <li class="gap-3 mb-3 d-flex">
                                    <div class="d-flex-center">
                                                <span class="h-45 w-45 d-flex-center b-r-10 position-relative">
                                                    
                                                </span>
                                    </div>
                                    <div class="mt-2 text-center">
                                        <h6 class="mb-0">
                                            <?php echo e(Auth::user()->name); ?>


                                            <img
                                                alt="instagram-check-mark"
                                                class="w-20 h-20"
                                                src="<?php echo e(asset('assets/images/profile-app/01.png')); ?>">

                                            </h6>
                                        <p class="mb-0 f-s-12 text-secondary"><?php echo e(Auth::user()->email); ?></p>
                                    </div>
                                </li>

                                


                                <li>
                                    <form method="POST" action="<?php echo e(route('logout')); ?>">
                                    <?php echo csrf_field(); ?>
                                    <a class="mb-0 btn btn-light-danger btn-sm justify-content-center "
                                    :href="route('logout')"
                                    onclick="event.preventDefault();
                                                this.closest('form').submit();"
                                       role="button">
                                         <i class="ph-duotone ph-sign-out pe-1 f-s-20"></i> Log Out
                                    </a>
                                </form>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>
</header>


<script>

function markAsRead(notificationId) {
    fetch(`/notifications/${notificationId}/read`, {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute('content'),
        },
        body: JSON.stringify({
            _method: 'POST', // Use POST method for AJAX
        }),
    })
    .then(response => response.json())
    .then(data => {
        // Add a class to mark the notification as read
        const notificationElement = document.querySelector(`[data-id="${notificationId}"]`);
        notificationElement.classList.add('read'); // Add read class
        notificationElement.style.opacity = 0.5; // Example: adjust opacity to show it's read
    })
    .catch(error => {
        console.error('Error:', error);
    });
}

</script>
<?php /**PATH D:\Work\WEB DEVELOPMENT\MainLaravel\pa\vault\resources\views/layouts/aheader.blade.php ENDPATH**/ ?>