<tr>
    <td><?php echo e($user->id); ?></td>
    <td>
        <strong><?php echo e($user->name); ?></strong>
        <br><small class="text-muted"><?php echo e($user->email); ?></small>
    </td>
    <td><?php echo e($user->phone); ?></td>
    <td>
        <?php if($user->is_active): ?>
        <span class="badge bg-success">Active</span>
        <?php else: ?>
        <span class="badge bg-danger">Inactive</span>
        <?php endif; ?>
    </td>
    <td>
        <?php if($user->sms_service_enabled): ?>
        <span class="badge bg-success"><i class="bi bi-check"></i></span>
        <?php else: ?>
        <span class="badge bg-secondary"><i class="bi bi-x"></i></span>
        <?php endif; ?>
    </td>
    <td>
        <?php if($user->settings && $user->settings->whatsapp_enabled): ?>
        <span class="badge bg-success"><i class="bi bi-whatsapp"></i></span>
        <?php else: ?>
        <span class="badge bg-secondary"><i class="bi bi-x"></i></span>
        <?php endif; ?>
    </td>
    <td>
        <?php if($user->promotions_enabled): ?>
        <span class="badge bg-success"><i class="bi bi-check"></i></span>
        <?php else: ?>
        <span class="badge bg-secondary"><i class="bi bi-x"></i></span>
        <?php endif; ?>
    </td>
    <td>
        <?php if($user->last_active_at): ?>
        <?php echo e($user->last_active_at->diffForHumans()); ?>

        <?php else: ?>
        <span class="text-muted">Never</span>
        <?php endif; ?>
    </td>
    <td>
        <div class="btn-group">
            <?php if(auth()->guard('admin')->user()->hasPermission('users.view')): ?>
            <a href="<?php echo e(route('dashboard.user-details', $user->id)); ?>"
                class="btn btn-sm btn-outline-primary" title="View Details">
                <i class="bi bi-eye"></i>
            </a>
            <?php endif; ?>
            <?php if(auth()->guard('admin')->user()->hasPermission('users.edit')): ?>
            <a href="<?php echo e(route('dashboard.users.edit', $user->id)); ?>"
                class="btn btn-sm btn-outline-secondary" title="Edit">
                <i class="bi bi-pencil"></i>
            </a>
            <?php endif; ?>
            <?php if(auth()->guard('admin')->user()->hasPermission('users.toggle_status')): ?>
            <form action="<?php echo e(route('dashboard.users.toggle-status', $user->id)); ?>" method="POST" class="d-inline">
                <?php echo csrf_field(); ?>
                <button type="submit" class="btn btn-sm btn-outline-<?php echo e($user->is_active ? 'warning' : 'success'); ?>"
                    title="<?php echo e($user->is_active ? 'Deactivate' : 'Activate'); ?>">
                    <i class="bi bi-<?php echo e($user->is_active ? 'pause' : 'play'); ?>"></i>
                </button>
            </form>
            <?php endif; ?>
            <?php if(auth()->guard('admin')->user()->hasPermission('users.delete')): ?>
            <form action="<?php echo e(route('dashboard.users.delete', $user->id)); ?>" method="POST" class="d-inline">
                <?php echo csrf_field(); ?>
                <?php echo method_field('DELETE'); ?>
                <button type="submit" class="btn btn-sm btn-outline-danger" title="Delete"
                    data-confirm="Are you sure?"
                    data-confirm-title="Delete User"
                    data-confirm-btn="Delete"
                    data-confirm-class="btn-danger">
                    <i class="bi bi-trash"></i>
                </button>
            </form>
            <?php endif; ?>
        </div>
    </td>
</tr>
<?php /**PATH /home/zwfgftjb/autopromix.byteengine.in/resources/views/dashboard/partials/user-row.blade.php ENDPATH**/ ?>