<div class="content-header">
   <div class="container-fluid">
      <div class="row mb-2">
         <div class="col-sm-6 col-md-4 d-flex flex-row justify-content-between">
            <h1 class="m-0 text-dark">User's List
            </h1>
            <div class="d-flex flex-row">
               <div class="dropdown">
                  <button class="btn bg-white border rounded-pill dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
                     All Users
                  </button>
                  <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
                     <li><a class="dropdown-item" href="#">Admin</a></li>
                     <li><a class="dropdown-item" href="#">Clients</a></li>
                     <li><a class="dropdown-item" href="#">Staff</a></li>
                  </ul>
               </div>
            </div>
         </div>
         <!-- /.col -->
         <div class="col-sm-6 col-md-8">
            <ol class="breadcrumb float-sm-right">
               <li class="breadcrumb-item"><a href="<?= base_url(); ?>/dashboard">Dashboard</a></li>
               <li class="breadcrumb-item active">User's List</li>
            </ol>
         </div>
      </div>
   </div>
</div>
<section class="content">
   <div class="container-fluid">
      <div class="card">
         <?php
         //  echo "<pre>";
         //  print_r($client);
         //  echo "</pre>";

         ?>
         <div class="card-body p-0">
            <div class="table-responsive">
               <table id="custtbl" class="table card-table table-vcenter text-nowrap">
                  <thead>
                     <tr>
                        <th class="w-1">S.No</th>
                        <th>Name</th>
                        <th>Type</th>
                        <th>Email</th>
                        <th>Status</th>
                        <th style="display:none">Action</th>
                     </tr>
                  </thead>
                  <tbody>
                     <?php if (!empty($staff)) {
                        $count = 1;
                        foreach ($staff as $st => $userlists) {
                     ?>
                           <tr>
                              <td> <?php echo output($count);
                                    $count++; ?></td>
                              <td> <?php echo output($userlists['firstName']) . " " . output($userlists['lastName']); ?></td>
                              <td> <?php echo output($userlists['email']); ?></td>
                              <td><?php echo output($userlists['userRole']); ?></td>
                              <td><span class="badge <?php echo ($userlists['isActive'] == '1') ? 'badge-success' : 'badge-danger'; ?> "><?php echo ($userlists['isActive'] == '1') ? 'Active' : 'Inactive'; ?></span>
                              </td>
                              <td style="display:none">
                                 <a class="icon" href="<?php echo base_url(); ?>users/edituser/<?php echo output($st); ?>">
                                    <i class="fa fa-edit"></i>
                                 </a>
                              </td>
                           </tr>
                     <?php }
                     } ?>
                     <?php if (!empty($client)) {

                        foreach ($client as $st => $userlists) {
                     ?>
                           <tr>
                              <td> <?php echo output($count);
                                    $count++; ?></td>
                              <td> <?php echo output($userlists['facilityName']); ?></td>
                              <td> <?php echo output($userlists['email']); ?></td>
                              <td><?php echo output($userlists['userRole']); ?></td>
                              <td><span class="badge <?php echo ($userlists['isActive'] == '1') ? 'badge-success' : 'badge-danger'; ?> "><?php echo ($userlists['isActive'] == '1') ? 'Active' : 'Inactive'; ?></span>
                              </td>
                              <td style="display:none">
                                 <a class="icon" href="<?php echo base_url(); ?>users/edituser/<?php echo output($st); ?>">
                                    <i class="fa fa-edit"></i>
                                 </a>
                              </td>
                           </tr>
                     <?php }
                     } ?>
                  </tbody>
               </table>
            </div>
         </div>
      </div>
   </div>
</section>