<nav class="navbar">
    <div class="heading">
      <div class="container">
        <div class="flex-data">
            <h1><?php echo e(__('messages.ministry_industry')); ?></h1>
          <div class="button-contain">
         
  <a href="<?php echo e(route('switch.language', ['lang' => app()->getLocale() == 'en' ? 'ar' : 'en'])); ?>" class="lang">
                        <span id="currentLang"><?php echo e(app()->getLocale() == 'en' ? 'AR' : 'EN'); ?></span>
                        
                    </a>

            <a href="<?php echo e(route('contact')); ?>" class="custom-btn light-color">
                <span>
                    <?php echo e(__('messages.contact_us')); ?>

                </span>
              </a>
          </div>
        </div>
      </div>
    </div>

    <div class="container">

      <div class="contain">
        <div class="hamburger">
          <span class="line"></span>
          <span class="line"></span>
          <span class="line"></span>
        </div>

        <a href="<?php echo e(route('home')); ?>" class="brand-name">
            <img
            src="<?php echo e(asset('logo_image/' . $setting->logo)); ?>"
            loading="lazy"
            alt="" />
            <span>
                <?php if(App::getLocale() == 'ar'): ?>
                <?php echo e($setting->ar_title); ?>

            <?php else: ?>
                <?php echo e($setting->en_title); ?>

            <?php endif; ?>

              </span>
        </a>

        <ul class="navbar-nav">
          <li class="nav-item">
            <a href="<?php echo e(route('home')); ?>" class="nav-link active">
                <?php echo e(__('messages.home')); ?>

            </a>
          </li>

          <li class="nav-item">
            <a href="<?php echo e(route('news')); ?>" class="nav-link">
                <?php echo e(__('messages.news')); ?>

            </a>
        </li>

          <!-- <li class="nav-item">
            <a href="about-us.html" class="nav-link">
              عن الشركة
            </a>
          </li> -->

          <li class="nav-item">
            <a href="<?php echo e(route('web_products')); ?>" class="nav-link">
                <?php echo e(__('messages.company_products')); ?>

            </a>
        </li>

          <li class="nav-item">
            <a href="<?php echo e(route('categories')); ?>" class="nav-link">
                <?php echo e(__('messages.categories')); ?>

            </a>
        </li>
        <li class="nav-item">
            <a href="<?php echo e(route('all_tenders')); ?>" class="nav-link">
                <?php echo e(__('messages.tenders')); ?>

            </a>
        </li>
        <?php $__currentLoopData = $mainPages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mainPage): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php if($mainPage->children->count() > 0): ?>
            <!-- إذا كانت الصفحة الرئيسية تحتوي على صفحات فرعية -->
            <li class="nav-item dropdown">
                <a href="<?php echo e(route('page_details', ['id' => $mainPage->id, 'lang' => app()->getLocale()])); ?>" class="nav-link dropdown-toggle" data-toggle="dropdown">

                    <?php echo e(app()->getLocale() == 'ar' ? $mainPage->ar_title : $mainPage->en_title); ?>

                </a>
                <div class="dropdown-menu">
                    <?php $__currentLoopData = $mainPage->children; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subPage): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <a class="dropdown-item" href="<?php echo e(route('page_details', ['id' => $subPage->id, 'lang' => app()->getLocale()])); ?>">

                            <?php echo e(app()->getLocale() == 'ar' ? $subPage->ar_title : $subPage->en_title); ?>

                        </a>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </li>
        <?php else: ?>
            <!-- إذا كانت الصفحة الرئيسية لا تحتوي على صفحات فرعية -->
            <li class="nav-item">
                <a href="<?php echo e(route('page_details', ['id' => $mainPage->id, 'lang' => app()->getLocale()])); ?>" class="nav-link">
                    <?php echo e(app()->getLocale() == 'ar' ? $mainPage->ar_title : $mainPage->en_title); ?>

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

          
        </ul>
      </div>
    </div>
  </nav>
<?php /**PATH C:\xampp\htdocs\icsc.industry.gov.iq\resources\views/partials/header.blade.php ENDPATH**/ ?>