<div class="app-sidebar colored">
    <div class="sidebar-header">
        <a class="header-brand" href="<?php echo e(route('dashboard')); ?>">
            <div class="logo-img">
               <img height="65" src="<?php echo e(asset('img/logo_white.png')); ?>" class="header-brand-img" title="RADMIN"> 
            </div>
        </a>
        <div class="sidebar-action"><i class="ik ik-arrow-left-circle"></i></div>
        <button id="sidebarClose" class="nav-close"><i class="ik ik-x"></i></button>
    </div>

    <?php
        $segment1 = request()->segment(1); 
        
        $segment2 = request()->segment(2);
    ?>
    
    <div class="sidebar-content">
        <div class="nav-container">
            <nav id="main-menu-navigation" class="navigation-main">
                <div class="nav-item <?php echo e(($segment1 == 'dashboard') ? 'active' : ''); ?>">
                    <a href="<?php echo e(route('dashboard')); ?>"><i class="ik ik-bar-chart-2"></i><span><?php echo e(__('Dashboard')); ?></span></a>
                </div>
                
                <?php
                use App\User;
                $id = Auth::user()->id;
                $user  = User::with('roles','permissions')->find($id);
                $role_name  = Auth::user()->roles->pluck('name');
                ?>

                <?php if($role_name[0] == "Super Admin" || $role_name[0] == "Admin"): ?>
                <div class="nav-item <?php echo e(($segment1 == 'users' || $segment1 == 'roles'||$segment1 == 'permission' ||$segment1 == 'user') ? 'active open' : ''); ?> has-sub">
                    <a href="#"><i class="ik ik-user"></i><span><?php echo e(__('Adminstrator')); ?></span></a>
                    <div class="submenu-content">
                        <!-- only those have manage_user permission will get access -->
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('manage_user')): ?>
                        <a href="<?php echo e(url('users')); ?>" class="menu-item <?php echo e(($segment1 == 'users') ? 'active' : ''); ?>"><?php echo e(__('Users')); ?></a>
                        <a href="<?php echo e(url('user/create')); ?>" class="menu-item <?php echo e(($segment1 == 'user' && $segment2 == 'create') ? 'active' : ''); ?>"><?php echo e(__('Add User')); ?></a>
                         <?php endif; ?>
                         <!-- only those have manage_role permission will get access -->
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('manage_roles')): ?>
                        <a href="<?php echo e(url('roles')); ?>" class="menu-item <?php echo e(($segment1 == 'roles') ? 'active' : ''); ?>"><?php echo e(__('Roles')); ?></a>
                        <?php endif; ?>
                        <!-- only those have manage_permission permission will get access -->
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('manage_permission')): ?>
                        <a href="<?php echo e(url('permission')); ?>" class="menu-item <?php echo e(($segment1 == 'permission') ? 'active' : ''); ?>"><?php echo e(__('Permission')); ?></a>
                        <?php endif; ?>
                    </div>
                </div>
                
                <div class="nav-lavel"><?php echo e(__('Master Pages View')); ?> </div>
                <div class="nav-item <?php echo e(($segment1 == 'form-components' || $segment1 == 'form-advance'||$segment1 == 'form-addon') ? 'active open' : ''); ?> has-sub">
                    <a href="#"><i class="ik ik-edit"></i><span><?php echo e(__('DT/ST/ART Master')); ?></span></a>
                    <div class="submenu-content" id="master">
                        <a href="<?php echo e(url('state-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'state-master-data') ? 'active' : ''); ?>"><?php echo e(__('State Master Data')); ?></a>
                        <a href="<?php echo e(url('district-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'district-master-data') ? 'active' : ''); ?>"><?php echo e(__('District Master Data')); ?></a>
                        <a href="<?php echo e(url('artcenter-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'artcenter-master-data') ? 'active' : ''); ?>"><?php echo e(__('ART Center Master(ACM)')); ?></a>
                    </div>
                </div>
                <div class="nav-item <?php echo e(($segment1 == 'form-components' || $segment1 == 'form-advance'||$segment1 == 'form-addon') ? 'active open' : ''); ?> has-sub">
                    <a href="#"><i class="ik ik-edit"></i><span><?php echo e(__('Outreach Input (ORI)')); ?></span></a>
                    <div class="submenu-content">
                        <a href="<?php echo e(url('lfumis-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'lfumis-master-data') ? 'active' : ''); ?>"><?php echo e(__('LFU_MIS')); ?></a>
                        <a href="<?php echo e(url('hd-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'hd-master-data') ? 'active' : ''); ?>"><?php echo e(__('Home Delivery')); ?></a>
                        <a href="<?php echo e(url('vl-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'vl-master-data') ? 'active' : ''); ?>"><?php echo e(__('VL')); ?></a>
                    </div>
                </div>
                <div class="nav-item <?php echo e(($segment1 == 'form-components' || $segment1 == 'form-advance'||$segment1 == 'form-addon') ? 'active open' : ''); ?> has-sub">
                    <a href="#"><i class="ik ik-edit"></i><span><?php echo e(__('Calling Input (CI)')); ?></span></a>
                    <div class="submenu-content">
                        <a href="<?php echo e(url('lfuci-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'lfuci-master-data') ? 'active' : ''); ?>"><?php echo e(__('LFU_MIS')); ?></a>
                        <a href="<?php echo e(url('cd4ci-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'cd4ci-master-data') ? 'active' : ''); ?>"><?php echo e(__('CD4_TLD_VLT')); ?></a>
                        <a href="<?php echo e(url('duedate-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'duedate-master-data') ? 'active' : ''); ?>"><?php echo e(__('Due Date Call')); ?></a>
                        <a href="<?php echo e(url('tbfollow-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'tbfollow-master-data') ? 'active' : ''); ?>"><?php echo e(__('TB Follow up')); ?></a>
                    </div>
                </div>
                <div class="nav-item <?php echo e(($segment1 == 'form-components' || $segment1 == 'form-advance'||$segment1 == 'form-addon') ? 'active open' : ''); ?> has-sub">
                    <a href="#"><i class="ik ik-edit"></i><span><?php echo e(__('EAC Input ( EACI)')); ?></span></a>
                    <div class="submenu-content">
                        <a href="<?php echo e(url('bta-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'bta-master-data') ? 'active' : ''); ?>"><?php echo e(__('Barrier to Adherence')); ?></a>
                        <a href="<?php echo e(url('int-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'int-master-data') ? 'active' : ''); ?>"><?php echo e(__('Intervention')); ?></a>
                        <a href="<?php echo e(url('adh-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'adh-master-data') ? 'active' : ''); ?>"><?php echo e(__('Adherence')); ?></a>
                        <a href="<?php echo e(url('sup-master-data')); ?>" class="menu-item <?php echo e(($segment1 == 'sup-master-data') ? 'active' : ''); ?>"><?php echo e(__('Support provided by Accelerate')); ?></a>
                    </div>
                </div>
                <?php endif; ?>

                <div class="nav-lavel"><?php echo e(__('Form Pages')); ?></div>
                <div class="nav-item <?php echo e(($segment1 == 'form-components' || $segment1 == 'form-advance'||$segment1 == 'form-addon') ? 'active open' : ''); ?> has-sub">
                    <a href="#"><i class="ik ik-edit"></i><span><?php echo e(__('Forms')); ?></span></a>
                    <div class="submenu-content">
                        <?php if(\Session::get('loggindata')->client_reg_add =='Yes'): ?>
                        <a href="<?php echo e(url('patient-register')); ?>" class="menu-item <?php echo e(($segment1 == 'patient-register') ? 'active' : ''); ?>"><?php echo e(__('Client Registration')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->client_map_add == 'Yes'): ?>
                        <a href="<?php echo e(url('patient-mapping')); ?>" class="menu-item <?php echo e(($segment1 == 'patient-mapping') ? 'active' : ''); ?>"><?php echo e(__('Client Mapping')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->outreach_add == 'Yes'): ?>
                        <a href="<?php echo e(url('outreach-input')); ?>" class="menu-item <?php echo e(($segment1 == 'outreach-input') ? 'active' : ''); ?>"><?php echo e(__('Outreach Input')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->calling_add == 'Yes'): ?>
                        <a href="<?php echo e(url('calling-input')); ?>" class="menu-item <?php echo e(($segment1 == 'calling-input') ? 'active' : ''); ?>"><?php echo e(__('Calling Input')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->eac_add == 'Yes'): ?>
                        <a href="<?php echo e(url('eac-input')); ?>" class="menu-item <?php echo e(($segment1 == 'eac-input') ? 'active' : ''); ?>"><?php echo e(__('EAC Input')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->doe_add == 'Yes'): ?>
                        <a href="<?php echo e(url('deo-input')); ?>" class="menu-item <?php echo e(($segment1 == 'deo-input') ? 'active' : ''); ?>"><?php echo e(__('Data Entry Operator')); ?></a>
                        <?php endif; ?>
                    </div>
                </div>
                
                <div class="nav-lavel"><?php echo e(__('Form View')); ?></div>
                <div class="nav-item <?php echo e(($segment1 == 'form-components' || $segment1 == 'form-advance'||$segment1 == 'form-addon') ? 'active open' : ''); ?> has-sub">
                    <a href="#"><i class="ik ik-edit"></i><span><?php echo e(__('Form View')); ?></span></a>
                    <div class="submenu-content">
                        <?php if(\Session::get('loggindata')->client_reg_view == 'Yes'): ?>
                        <a href="<?php echo e(url('patient-register-data')); ?>" class="menu-item <?php echo e(($segment1 == 'patient-register-data') ? 'active' : ''); ?>"><?php echo e(__('Client Registration Data')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->client_map_view == 'Yes'): ?>
                        <a href="<?php echo e(url('patient-mapping-data')); ?>" class="menu-item <?php echo e(($segment1 == 'patient-mapping-data') ? 'active' : ''); ?>"><?php echo e(__('Client Mapping Data')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->outreach_view == 'Yes'): ?>
                        <a href="<?php echo e(url('outreach-input-data')); ?>" class="menu-item <?php echo e(($segment1 == 'outreach-input-data') ? 'active' : ''); ?>"><?php echo e(__('Outreach Input Data')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->calling_view == 'Yes'): ?>
                        <a href="<?php echo e(url('calling-input-data')); ?>" class="menu-item <?php echo e(($segment1 == 'calling-input-data') ? 'active' : ''); ?>"><?php echo e(__('Calling Input Data')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->eac_view == 'Yes'): ?>
                        <a href="<?php echo e(url('eac-input-data')); ?>" class="menu-item <?php echo e(($segment1 == 'eac-input-data') ? 'active' : ''); ?>"><?php echo e(__('EAC Input Data')); ?></a>
                        <?php endif; ?>
                        <?php if(\Session::get('loggindata')->doe_view == 'Yes'): ?>
                        <a href="<?php echo e(url('deo-input-data')); ?>" class="menu-item <?php echo e(($segment1 == 'deo-input-data') ? 'active' : ''); ?>"><?php echo e(__('Data Entry Operator Data')); ?></a>
                        <?php endif; ?>
                    </div>
                </div>
                
                
                <?php if($role_name[0] == "Super Admin" || $role_name[0] == "Admin"): ?>
                <div class="nav-lavel"><?php echo e(__('Logs Detail')); ?> </div>
                <div class="nav-item <?php echo e(($segment1 == 'form-components' || $segment1 == 'form-advance'||$segment1 == 'form-addon') ? 'active open' : ''); ?>">
                    <a href="<?php echo e(route('user_logs')); ?>"><i class="ik ik-edit"></i><span><?php echo e(__('View User Logs')); ?></span></a>
                </div>
                <?php endif; ?>
            </nav>
        </div>
    </div>
</div><?php /**PATH /home/viruxyz/public_html/treatbuddy/resources/views/include/sidebar.blade.php ENDPATH**/ ?>