<?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=> $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

<?php
    $disableDelete= ($row->disable_delete ?? null);
?>
<tr>
    <th scope="row">
        <?php if(!$disableDelete): ?>
            <div class="custom-control custom-checkbox">
                <input type="checkbox" class="custom-control-input selectOne deleteCheck" id="customCheck<?php echo e($row->code); ?>" value="<?php echo e($row->code); ?>" name="id[]">
                <label class="custom-control-label" for="customCheck<?php echo e($row->code); ?>"></label>
            </div>
        <?php endif; ?>

    </th>
    <td><?php echo e($row->name); ?></td>
    <td><?php echo e($row->email); ?></td>
    <td><?php echo e($row->phone); ?></td>
    <td><?php echo e(__('users.roles.'.$row->role)); ?></td>
    <td colspan="2"><?php echo e(dateFormat($row->created_at, 'Y/m/d')); ?></td>
    <td>

        <div class="dropdown">
            <button class="icon_dots dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
                <i class="bi bi-three-dots-vertical"></i>
            </button>
            <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                 <?php if($row->is_provider_admin): ?>
                        <a href="<?php echo e(route ('users.edit', $row->code)); ?>" class="dropdown-item" title="<?php echo e(__('dashboard.edit')); ?>"> <i class="bi bi-pen ml-1"></i> <?php echo e(__('dashboard.edit')); ?> </a>
                <?php else: ?>
                    <?php if($row->deleted_at): ?>
                        <?php if(!$disableDelete): ?>
                            <a href="<?php echo e(route ('users.restore', $row->code)); ?>" data-method="put" class="dropdown-item rowAction" title="<?php echo e(__('dashboard.restore')); ?>"> <i class="bi bi-pen ml-1"></i> <?php echo e(__('dashboard.restore')); ?> </a>
                            
                        <?php endif; ?>
                    <?php else: ?>
                        <a href="<?php echo e(route ('users.edit', $row->code)); ?>" class="dropdown-item" title="<?php echo e(__('dashboard.edit')); ?>"> <i class="bi bi-pen ml-1"></i> <?php echo e(__('dashboard.edit')); ?> </a>
                        <?php if(!$disableDelete): ?>
                            <a href="<?php echo e(route ('users.destroy', $row->code)); ?>" data-method="delete" class="dropdown-item rowAction" title="<?php echo e(__('dashboard.trash')); ?>"> <i class="bi bi-slash-circle ml-1"></i> <?php echo e(__('dashboard.trash')); ?> </a>
                        <?php endif; ?>
                    <?php endif; ?>
                <?php endif; ?>
            </div>
        </div>



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

<?php if( count( $users ) && $users->hasPages() ): ?>
<tr> <td></td><td> <?php echo e($users->links()); ?> </td> </tr>
<?php endif; ?>
<?php /**PATH /Users/mostafagalal/Desktop/Sites/AhmedGoda/resources/views/admin/users/grid.blade.php ENDPATH**/ ?>