<div class="sidebar" >
    <div class="sidebar-wrapper">
        <div class="logo">
            <a href="#" class="simple-text logo-normal" style="text-align: center;"><?php echo e(__('ADMIN PANEL')); ?></a>
        </div>
        <?php $privileges=explode(",",auth()->user()->privileges);?>
       <?php if(auth()->user()->role=="admin") {?>
        <ul class="nav">
            <li <?php if($pageSlug == 'dashboard'): ?> class="active " <?php endif; ?>>
                <a href="<?php echo e(route('home')); ?>">
                    <i class="tim-icons icon-chart-pie-36"></i>
                    <p><?php echo e(__('Dashboard')); ?></p>
                </a>
            </li>
            <li>
                <a data-toggle="collapse" href="#laravel-examples" aria-expanded="true">
                    <i class="fab fa-laravel" ></i>
                    <span class="nav-link-text" ><?php echo e(__('User Management')); ?></span>
                    <b class="caret mt-1"></b>
                </a>

                <div class="collapse show" id="laravel-examples">
                    <ul class="nav pl-4">
                        <li <?php if($pageSlug == 'profile'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('profile.edit')); ?>">
                                <i class="tim-icons icon-single-02"></i>
                                <p><?php echo e(__('User Profile')); ?></p>
                            </a>
                        </li>
                         
                        <li <?php if($pageSlug == 'userlist'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('user.index')); ?>">
                                <i class="tim-icons icon-bullet-list-67"></i>
                                <p><?php echo e(__('User List')); ?></p>
                            </a>
                        </li>
                    </ul>
                </div>
            </li>
            <li <?php  echo ($pageSlug=="test")?'class="active "':'';?>>
                <a href="<?php echo e(route('listtest')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Test')); ?></p>
                </a>
            </li>
            <li <?php  echo ($pageSlug=="tags")?'class="active "':'';?>>
                <a href="<?php echo e(route('listtag')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Tag')); ?></p>
                </a>
            </li>
              <li <?php  echo ($pageSlug=="questions")?'class="active "':'';?>>
                <a href="<?php echo e(route('questions')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Questions')); ?></p>
                </a>
            </li>
            <li <?php  echo ($pageSlug=="questionscategory")?'class="active "':'';?>>
                <a href="<?php echo e(route('listquestioncategory')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Question Category')); ?></p>
                </a>
            </li>
            <li <?php   echo ($pageSlug=="category")?'class="active "':'';?>>
                <a href="<?php echo e(route('category')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Category')); ?></p>
                </a>
            </li>
            <li <?php  echo ($pageSlug=="weightage")?'class="active "':'';?>>
                <a href="<?php echo e(route('weightage')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Weightage')); ?></p>
                </a>
            </li>
            <li <?php  echo ($pageSlug=="feedback")?'class="active "':'';?>>
                <a href="<?php echo e(route('feedback')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('User Feedback')); ?></p>
                </a>
            </li>
            <li>
                <a data-toggle="collapse" href="#reports" aria-expanded="true">
                    <i class="fas fa-chart-bar" ></i>
                    <span class="nav-link-text" ><?php echo e(__('Reports')); ?></span>
                    <b class="caret mt-1"></b>
                </a>

                <div class="collapse show" id="reports">
                    <ul class="nav pl-4">
                        <li <?php if($pageSlug == 'reports'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('reports')); ?>">
                                <i class="tim-icons icon-single-02"></i>
                                <p><?php echo e(__('User Report')); ?></p>
                            </a>
                        </li>
                        <li <?php if($pageSlug == 'questionreports'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('questionreports')); ?>">
                                <i class="tim-icons icon-chart-bar-32"></i>
                                <p><?php echo e(__('Audio Category Report')); ?></p>
                            </a>
                        </li>
                        <li <?php if($pageSlug == 'weightagereports'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('weightagereports')); ?>">
                                <i class="tim-icons icon-chart-pie-36"></i>
                                <p><?php echo e(__('Weightage Reports')); ?></p>
                            </a>
                        </li>
                        <li <?php  echo ($pageSlug=="websitereport")?'class="active "':'';?>>
                            <a href="<?php echo e(route('websitereport')); ?>">
                                <i class="tim-icons icon-bullet-list-67"></i>
                                <p><?php echo e(__('Website Performance')); ?></p>
                            </a>
                        </li>
                        <li <?php  echo ($pageSlug=="audioreport")?'class="active "':'';?>>
                            <a href="<?php echo e(route('audioreport')); ?>">
                                <i class="tim-icons icon-bullet-list-67"></i>
                                <p><?php echo e(__('Audio Questions')); ?></p>
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

        </ul>
        <?php } else{?>
           <ul class="nav">
            <li <?php if($pageSlug == 'dashboard'): ?> class="active " <?php endif; ?>>
                <a href="<?php echo e(route('home')); ?>">
                    <i class="tim-icons icon-chart-pie-36"></i>
                    <p><?php echo e(__('Dashboard')); ?></p>
                </a>
            </li>
            <li>
                <a data-toggle="collapse" href="#laravel-examples" aria-expanded="true">
                    <i class="fab fa-laravel" ></i>
                    <span class="nav-link-text" ><?php echo e(__('User Management')); ?></span>
                    <b class="caret mt-1"></b>
                </a>

                <div class="collapse show" id="laravel-examples">
                    <ul class="nav pl-4">
                        <li <?php if($pageSlug == 'profile'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('profile.edit')); ?>">
                                <i class="tim-icons icon-single-02"></i>
                                <p><?php echo e(__('User Profile')); ?></p>
                            </a>
                        </li>
                         
                         <?php 
                        if(in_array("user",$privileges)) {?>
                        <li <?php if($pageSlug == 'userlist'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('user.index')); ?>">
                                <i class="tim-icons icon-bullet-list-67"></i>
                                <p><?php echo e(__('User List')); ?></p>
                            </a>
                        </li>
                        <?php } ?>
                    </ul>
                </div>
            </li>
            <?php if(in_array("listtest",$privileges)) {?>
            <li <?php  echo ($pageSlug=="test")?'class="active "':'';?>>
                <a href="<?php echo e(route('listtest')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Test')); ?></p>
                </a>
            </li>
            <?php } ?>
            <?php if(in_array("listtag",$privileges)) {?>
            <li <?php  echo ($pageSlug=="tags")?'class="active "':'';?>>
                <a href="<?php echo e(route('listtag')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Tag')); ?></p>
                </a>
            </li>
            <?php } ?>
            <?php if(in_array("questions",$privileges)) {?>
              <li <?php  echo ($pageSlug=="questions")?'class="active "':'';?>>
                <a href="<?php echo e(route('questions')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Questions')); ?></p>
                </a>
            </li>
            <?php } ?>
            <?php if(in_array("listquestioncategory",$privileges)) {?>
            <li <?php  echo ($pageSlug=="questionscategory")?'class="active "':'';?>>
                <a href="<?php echo e(route('listquestioncategory')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Question Category')); ?></p>
                </a>
            </li>
            <?php } ?>
             <?php if(in_array("category",$privileges)) {?>
            <li <?php   echo ($pageSlug=="category")?'class="active "':'';?>>
                <a href="<?php echo e(route('category')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Category')); ?></p>
                </a>
            </li>
            <?php } ?>
             <?php if(in_array("weightage",$privileges)) {?>
            <li <?php  echo ($pageSlug=="weightage")?'class="active "':'';?>>
                <a href="<?php echo e(route('weightage')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('Weightage')); ?></p>
                </a>
            </li>
            <?php } ?>
            <li <?php  echo ($pageSlug=="feedback")?'class="active "':'';?>>
                <a href="<?php echo e(route('feedback')); ?>">
                    <i class="tim-icons icon-bullet-list-67"></i>
                    <p><?php echo e(__('User Feedback')); ?></p>
                </a>
            </li>
            <li>
                <a data-toggle="collapse" href="#reports" aria-expanded="true">
                    <i class="fas fa-chart-bar" ></i>
                    <span class="nav-link-text" ><?php echo e(__('Reports')); ?></span>
                    <b class="caret mt-1"></b>
                </a>

                <div class="collapse show" id="reports">
                    <ul class="nav pl-4">
                        <?php if(in_array("reports",$privileges)) {?>
                        <li <?php if($pageSlug == 'reports'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('reports')); ?>">
                                <i class="tim-icons icon-single-02"></i>
                                <p><?php echo e(__('User Report')); ?></p>
                            </a>
                        </li>
                        <?php } if(in_array("questionreports",$privileges)) { ?>
                        <li <?php if($pageSlug == 'questionreports'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('questionreports')); ?>">
                                <i class="tim-icons icon-chart-bar-32"></i>
                                <p><?php echo e(__('Category Report')); ?></p>
                            </a>
                        </li>
                        <?php } if(in_array("weightagereports",$privileges)) { ?>
                        <li <?php if($pageSlug == 'weightagereports'): ?> class="active " <?php endif; ?>>
                            <a href="<?php echo e(route('weightagereports')); ?>">
                                <i class="tim-icons icon-chart-pie-36"></i>
                                <p><?php echo e(__('Weightage Reports')); ?></p>
                            </a>
                        </li>
                        <?php } if(in_array("websitereport",$privileges)) { ?>
                        <li <?php  echo ($pageSlug=="websitereport")?'class="active "':'';?>>
                            <a href="<?php echo e(route('websitereport')); ?>">
                                <i class="tim-icons icon-bullet-list-67"></i>
                                <p><?php echo e(__('Website Performance')); ?></p>
                            </a>
                        </li>
                        <?php } if(in_array("audioreport",$privileges)) { ?>
                        <li <?php  echo ($pageSlug=="audioreport")?'class="active "':'';?>>
                            <a href="<?php echo e(route('audioreport')); ?>">
                                <i class="tim-icons icon-bullet-list-67"></i>
                                <p><?php echo e(__('Audio Questions')); ?></p>
                            </a>
                        </li>
                        <?php } ?>
                    </ul>
                </div>
            </li>
        </ul>
            <?php } ?>
    </div>
</div>
<?php /**PATH /home/sibzsolu/public_html/training/stimclex/resources/views/layouts/navbars/sidebar.blade.php ENDPATH**/ ?>