    
<?php $__env->startSection('content'); ?>
  <div class="card-header">
    <div class="d-flex flex-wrap justify-content-between align-items-center gap-3">
      <h4 class="mb-0">Manage Institutes</h4>
      <a class="btn btn-primary" href="<?php echo e(route('admin.addinstitute')); ?>">Add Institute</a>
    </div>
  </div>
  <div class="card-body">
    <div class="institute-summary">
      <div class="institute-summary-item">
        <span>Total Institutes</span>
        <strong><?php echo e(number_format($usersdetals->count())); ?></strong>
      </div>
      <div class="institute-summary-item">
        <span>Active Accounts</span>
        <strong><?php echo e(number_format($usersdetals->where('status', 1)->count())); ?></strong>
      </div>
      <div class="institute-summary-item">
        <span>Blocked Accounts</span>
        <strong><?php echo e(number_format($usersdetals->where('status', '!=', 1)->count())); ?></strong>
      </div>
    </div>

    <div class="table-responsive">
      <table class="table table-striped table-hover" id="tableExport" style="width:100%;">
        <thead>
          <tr>
            <th>Institute Name</th>
            <th>Mobile Number</th>
            <th>City / State</th>
            <th>Official Contact</th>
            <th>Email</th>
            <th>Commission %</th>
            <th>Status</th>
            <th>Action</th>
          </tr>
        </thead>
        <tbody>
          <?php $__currentLoopData = $usersdetals; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $institute): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
              <td>
                <strong><?php echo e($institute->name); ?></strong>
                <div class="table-subtext"><?php echo e($institute->address ?: '-'); ?></div>
              </td>
              <td>
                <?php if($institute->mobileno): ?>
                  <a href="tel:<?php echo e($institute->mobileno); ?>"><?php echo e($institute->mobileno); ?></a>
                <?php else: ?>
                  -
                <?php endif; ?>
              </td>
              <td><?php echo e(trim(($institute->cityname ?: '').(($institute->cityname && $institute->statename) ? ', ' : '').($institute->statename ?: '')) ?: '-'); ?></td>
              <td><?php echo e($institute->contactnumber ?: '-'); ?></td>
              <td><?php echo e($institute->email ?: '-'); ?></td>
              <td><?php echo e($institute->schoolcommision !== null && $institute->schoolcommision !== '' ? $institute->schoolcommision.'%' : '-'); ?></td>
              <td>
                <?php if((int) $institute->status === 1): ?>
                  <span class="badge badge-success">Active</span>
                <?php else: ?>
                  <span class="badge badge-danger">Blocked</span>
                <?php endif; ?>
              </td>
              <td class="institute-actions">
                <a class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="Edit Institute" href="<?php echo e(route('admin.instituteprofiledetails', ['id' => $institute->id])); ?>">
                  <i class='fas fa-pencil-alt'></i>
                </a>
                <a class="btn btn-dark btn-sm" data-toggle="tooltip" data-placement="top" title="Change Password" href="<?php echo e(route('admin.changepassword', ['userid' => $institute->id])); ?>">
                  <i class='fas fa-key'></i>
                </a>
              </td>
            </tr>
          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
      </table>
    </div>
  </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\examproject\examproject_new\resources\views/admin/users/institutedetails.blade.php ENDPATH**/ ?>