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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5685GJP9');</script>
<!-- End Google Tag Manager -->
</head>
<style>
.mobonly{
    display:none !important;
}

/* MOBILE MENU FIX */
@media (max-width:770px){

.list-main{
    width:100% !important;
}

.list-main li{
    display:block !important;
    width:100% !important;
    text-align:left !important;
    padding:8px 0 !important;
}

.list-main li a{
    display:inline-block !important;
}

/* hide on desktop */
.mobonly{
    display:none !important;
}

/* show only on mobile */
.mobonly{
    display:block !important;
}

}


/* MOBILE MENU FIX */
@media (max-width:770px){

.list-main{
    width:100% !important;
}

.list-main li{
    display:block !important;
    width:100% !important;
    text-align:left !important;
    padding:8px 0 !important;
}

.list-main li a{
    display:inline-block !important;
}

/* hide on desktop */
.mobonly{
    display:none !important;
}

/* show only on mobile */
.mobonly{
    display:block !important;
}

}


</style>
<body>
    <!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5685GJP9"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
    <header class="header shop">
        <!-- Topbar -->
        <div class="topbar">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6 col-md-12 col-12">
                        <!-- Top Left -->
                        <div class="top-left">
                            <ul class="list-main">
                                <?php
                                $settings=DB::table('settings')->get();

                                ?>
                                <li><i class="ti-headphone-alt"></i><?php $__currentLoopData = $settings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($data->phone); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></li>
                                <li><i class="ti-email"></i> <?php $__currentLoopData = $settings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($data->email); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></li>
                            </ul>
                        </div>
                        <!--/ End Top Left -->
                    </div>




                    <div class="col-lg-6 col-md-12 col-12">
                        <!-- Top Right -->
                        <div class="right-content">
                            <ul class="list-main">
                                <li><i class="ti-location-pin"></i> <a href="<?php echo e(route('order.track')); ?>">Track Order</a></li>
                                <li class="mobonly">
            <i class="ti-heart"></i>
            <a href="<?php echo e(route('wishlist')); ?>">Wishlist</a>
        </li>

        <!-- Mobile Only Cart -->
        <li class="mobonly">
            <i class="ti-shopping-cart"></i>
            <a href="<?php echo e(route('cart')); ?>">Cart</a>
        </li>
                                
                                <?php if(auth()->guard()->check()): ?>
                                <?php if(Auth::user()->role=='admin'): ?>
                                <li><i class="ti-user"></i> <a href="<?php echo e(route('admin')); ?>" target="_blank">Dashboard</a></li>
                                <?php else: ?>
                                <li><i class="ti-user"></i> <a href="<?php echo e(route('user')); ?>" target="_blank">Dashboard</a></li>
                                <?php endif; ?>
                                <li><i class="ti-power-off"></i> <a href="<?php echo e(route('user.logout')); ?>">Logout</a></li>

                                <?php else: ?>
                                <li><i class="ti-power-off"></i><a href="<?php echo e(route('login.form')); ?>">Login /</a> <a href="<?php echo e(route('register.form')); ?>">Register</a></li>
                                <?php endif; ?>
                            </ul>
                        </div>
                        <!-- End Top Right -->
                    </div>
                </div>
            </div>
        </div>




        <!-- End Topbar -->
        <!-- <div class="middle-inner"> -->
        <div class="middle-inner py-1">
            <div class="container">
                <div class="row">
                    <div class="col-lg-2 col-md-2 col-12">
                        <!-- Logo -->
                        <div class="logo">
                            <?php
                            $settings=DB::table('settings')->get();
                            ?>
                            <a href="<?php echo e(route('home')); ?>"><img src="<?php $__currentLoopData = $settings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($data->logo); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>" alt="logo" style="max-height:55px"></a>
                        </div>
                        <!--/ End Logo -->
                        <!-- Search Form -->
                        <div class="search-top">
                            <div class="top-search"><a href="#0"><i class="ti-search"></i></a></div>
                            <!-- Search Form -->
                            <div class="search-top">
                                <form class="search-form">
                                    <input type="text" placeholder="Search here..." name="search">
                                    <button value="search" type="submit"><i class="ti-search"></i></button>
                                </form>
                            </div>
                            <!--/ End Search Form -->
                        </div>
                        <!--/ End Search Form -->
                        <div class="mobile-nav"></div>
                    </div>




                    <div class="col-lg-8 col-md-7 col-12">
                        <div class="search-bar-top">
                            <div class="search-bar">

                                <select>
                                    <option value="">All Category</option>

                                    <?php
                                    $mainCategories = DB::table('categories')
                                    ->where('is_parent',1)
                                    ->where('status','active')
                                    ->get();
                                    ?>

                                    <?php $__currentLoopData = $mainCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $main): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                    <option disabled style="font-weight:bold;">
                                        <?php echo e($main->title); ?>

                                    </option>

                                    <?php
                                    $subCategories = DB::table('categories')
                                    ->where('parent_id',$main->id)
                                    ->where('status','active')
                                    ->get();
                                    ?>

                                    <?php $__currentLoopData = $subCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sub): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($sub->slug); ?>">
                                        &nbsp;&nbsp;— <?php echo e($sub->title); ?>

                                    </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                </select>
                                <form method="POST" action="<?php echo e(route('product.search')); ?>">
                                    <?php echo csrf_field(); ?>
                                    <input name="search" placeholder="Search Products Here....." type="search">
                                    <button class="btnn" type="submit"><i class="ti-search"></i></button>
                                </form>

                            </div>
                        </div>
                    </div>
                    <div class="col-lg-2 col-md-3 col-12">
                        <div class="right-bar">
                            <!-- Search Form -->
                            <div class="sinlge-bar shopping">

                            <a href="<?php echo e(route('wishlist')); ?>" class="single-icon">
                                <i class="fa fa-heart-o"></i>
                                <span class="total-count"><?php echo e(Helper::wishlistCount()); ?></span>
                            </a>

                            <?php if(auth()->guard()->check()): ?>
                                <div class="shopping-item">
                                    <div class="dropdown-cart-header">
                                        <span><?php echo e(count(Helper::getAllProductFromWishlist())); ?> Items</span>
                                        <a href="<?php echo e(route('wishlist')); ?>">View Wishlist</a>
                                    </div>

                                    <ul class="shopping-list">
                                        <?php $__currentLoopData = Helper::getAllProductFromWishlist(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <?php $photo = explode(',', $data->product['photo']); ?>
                                            <li>
                                                <a href="<?php echo e(route('wishlist-delete', $data->id)); ?>" class="remove">
                                                    <i class="fa fa-remove"></i>
                                                </a>
                                                <a class="cart-img" href="#">
                                                    <img src="<?php echo e($photo[0]); ?>" alt="">
                                                </a>
                                                <h4>
                                                    <a href="<?php echo e(route('product-detail', $data->product['slug'])); ?>">
                                                        <?php echo e($data->product['title']); ?>

                                                    </a>
                                                </h4>
                                                <p class="quantity">
                                                    <?php echo e($data->quantity); ?> x
                                                    <span class="amount">
                                                        $<?php echo e(number_format($data->price,2)); ?>

                                                    </span>
                                                </p>
                                            </li>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </ul>

                                    <div class="bottom">
                                        <div class="total">
                                            <span>Total</span>
                                            <span class="total-amount">
                                                ₹<?php echo e(number_format(Helper::totalWishlistPrice(),2)); ?>

                                            </span>
                                        </div>
                                        <a href="<?php echo e(route('cart')); ?>" class="btn animate">Cart</a>
                                    </div>
                                </div>
                            <?php endif; ?>
                        </div>

                            

                        <div class="sinlge-bar shopping">
                            <a href="<?php echo e(route('cart')); ?>" class="single-icon"><i class="ti-bag"></i> <span class="total-count"><?php echo e(Helper::cartCount()); ?></span></a>
                            <!-- Shopping Item -->
                            <?php if(auth()->guard()->check()): ?>
                            <div class="shopping-item">
                                <div class="dropdown-cart-header">
                                    <span><?php echo e(count(Helper::getAllProductFromCart())); ?> Items</span>
                                    <a href="<?php echo e(route('cart')); ?>">View Cart</a>
                                </div>
                                <ul class="shopping-list">

                                    <?php $__currentLoopData = Helper::getAllProductFromCart(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                    
                                    <?php if($data->item_type === 'product' && $data->product): ?>

                                    <?php
                                    $photo = explode(',', $data->product->photo);
                                    ?>

                                    <li>
                                        <a href="<?php echo e(route('cart-delete', $data->id)); ?>" class="remove">
                                            <i class="fa fa-remove"></i>
                                        </a>

                                        <a class="cart-img" href="#">
                                            <img src="<?php echo e($photo[0]); ?>" alt="<?php echo e($data->product->title); ?>">
                                        </a>

                                        <h4>
                                            <a href="<?php echo e(route('product-detail', $data->product->slug)); ?>" target="_blank">
                                                <?php echo e($data->product->title); ?>

                                            </a>
                                        </h4>

                                        <p class="quantity">
                                            <?php echo e($data->quantity); ?> ×
                                            <span class="amount">Rs. <?php echo e(number_format($data->price, 2)); ?></span>
                                        </p>
                                    </li>

                                    
                                    <?php elseif($data->item_type === 'subscription' && $data->subscription): ?>

                                    <li>
                                        <a href="<?php echo e(route('cart-delete', $data->id)); ?>" class="remove">
                                            <i class="fa fa-remove"></i>
                                        </a>

                                        
                                        <div class="cart-img d-flex align-items-center justify-content-center"
                                            style="background:#f5f5f5; width:70px; height:70px;">
                                            <i class="fa fa-briefcase fa-2x"></i>
                                        </div>

                                        <h4>
                                            <?php echo e($data->subscription->package_name); ?>

                                        </h4>

                                        <p class="quantity">
                                            1 ×
                                            <span class="amount">Rs. <?php echo e(number_format($data->price, 2)); ?></span>
                                        </p>

                                        <small class="text-muted">Subscription Package</small>
                                    </li>

                                    <?php endif; ?>

                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                </ul>

                                <div class="bottom">
                                    <div class="total">
                                        <span>Total</span>
                                        <span class="total-amount">Rs. <?php echo e(number_format(Helper::totalCartPrice(),2)); ?></span>
                                    </div>
                                    <a href="<?php echo e(route('checkout')); ?>" class="btn animate">Checkout</a>
                                </div>
                            </div>
                            <?php endif; ?>
                            <!--/ End Shopping Item -->


                        </div>

                    </div>

                </div>
            </div>

        </div>
        </div>
        <!-- Header Inner -->
        <div class="header-inner">
            <div class="container">
                <div class="cat-nav-head">
                    <div class="row">
                        <div class="col-lg-12 col-12">
                            <div class="menu-area">
                                <!-- Main Menu -->
                                <nav class="navbar navbar-expand-lg">
                                    <div class="navbar-collapse">
                                        <div class="nav-inner">
                                            <ul class="nav main-menu menu navbar-nav">
                                                <li class="<?php echo e(Request::path()=='home' ? 'active' : ''); ?>"><a href="<?php echo e(route('home')); ?>">Home</a></li>
                                                <li class="<?php echo e(Request::path()=='about-us' ? 'active' : ''); ?>"><a href="<?php echo e(route('about-us')); ?>">About Us</a></li>
                                                <li class="<?php if(Request::path()=='product-grids'||Request::path()=='product-lists'): ?>  active  <?php endif; ?>"><a href="<?php echo e(route('product-grids')); ?>">Products</a><span class="new">New</span></li>
                                                <?php echo e(Helper::getHeaderCategory()); ?>

                                                <!-- <li class="<?php echo e(Request::path()=='blog' ? 'active' : ''); ?>"><a href="<?php echo e(route('blog')); ?>">Blog</a></li>									 -->
                                                <!--Industrial Package Section Commented by Dhaval
                                                <li class="<?php echo e(Request::path() == 'subscription' ? 'active' : ''); ?>">
                                                    <a href="<?php echo e(route('subscription')); ?>">Industrial Package</a>
                                                
                                                </li>-->

                                                <li class="<?php echo e(Request::path()=='contact' ? 'active' : ''); ?>"><a href="<?php echo e(route('contact')); ?>">Contact Us</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </nav>
                                <!--/ End Main Menu -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--/ End Header Inner -->
    </header>
</body>

</html><?php /**PATH /var/www/ecommerce_website/resources/views/frontend/layouts/header.blade.php ENDPATH**/ ?>