<?php $__env->startSection('title'); ?>
  <?php echo e(__('translations.clients-list')); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('sub-title'); ?>
  <?php echo e(__('translations.clients')); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
  <div class="content d-flex flex-column flex-column-fluid" id="kt_content">
    <div class="post d-flex flex-column-fluid" id="kt_post">
      <div id="kt_content_container" class="container-fluid">
        <div class="row">
          <div class="col-12">
            <div class="card card-docs mb-2">
              <div class="card-header">
                <div class="card-title m-0">
                  <h3 class="fw-bolder m-0"><?php echo e(__('translations.clients-list')); ?></h3>
                </div>
                <div class="card-toolbar">
                  <?php if (app('laratrust')->hasPermission('clients-create')) : ?>
                    <a href="<?php echo e(route('admin.clients.create')); ?>" class="btn btn-primary">
                      <span class="svg-icon svg-icon-2">
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
                          fill="none">
                          <rect opacity="0.5" x="11.364" y="20.364" width="16" height="2" rx="1"
                            transform="rotate(-90 11.364 20.364)" fill="white" stroke="white" stroke-width="3"></rect>
                          <rect x="4.36396" y="11.364" width="16" height="2" rx="1" fill="white"
                            stroke="white" stroke-width="3"></rect>
                        </svg>
                      </span>
                      <span><?php echo e(__('translations.clients-create')); ?></span>
                    </a>
                  <?php endif; // app('laratrust')->permission ?>
                </div>
              </div>
              <div class="card-body">
                <div class="d-flex align-items-center position-relative mb-4">
                  <span class="svg-icon svg-icon-1 position-absolute ms-4">
                    <svg width="18" height="18" viewBox="0 0 24 24">
                      <path fill="currentColor"
                        d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z" />
                    </svg>
                  </span>
                  <input type="text" data-kt-filter="search" class="form-control form-control-solid w-250px ps-14"
                    placeholder="<?php echo e(__('translations.clients-search')); ?>" />
                </div>
                <table id="kt_datatable_example"
                  class="table align-middle table-row-dashed fs-6 gy-5 custom-table d-table">
                  <thead>
                    <tr class="fw-bolder fs-8 text-uppercase gs-0">
                      <th><?php echo e(__('translations.first name')); ?></th>
                      <th><?php echo e(__('translations.last name')); ?></th>
                      <th><?php echo e(__('translations.phone')); ?></th>
                      <th><?php echo e(__('translations.age')); ?></th>
                      <th><?php echo e(__('translations.Gender')); ?></th>
                      <th><?php echo e(__('translations.City')); ?></th>
                      <th><?php echo e(__('translations.Region')); ?></th>
                      <th><?php echo e(__('translations.actions')); ?></th>
                    </tr>
                  </thead>
                  <tbody class="text-gray-800 fw-bold">
                    <?php $__currentLoopData = $clients; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $client): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <tr>
                        <td><?php echo e($client->first_name); ?></td>
                        <td><?php echo e($client->last_name); ?></td>
                        <td><?php echo e($client->phone); ?></td>
                        <td><?php echo e($client->age); ?>

                          <?php echo e(__('translations.year')); ?></td>
                        <td><?php echo e($client->gender); ?></td>
                        <td><?php echo e($client->city ? $client->city->name : ''); ?>

                        </td>
                        <td><?php echo e($client->region ? $client->region->name : ''); ?>

                        </td>
                        <td>
                          <button class="btn btn-light btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
                            data-bs-toggle="dropdown" aria-expanded="false">
                            <?php echo e(__('translations.actions')); ?>

                          </button>
                          <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                            <?php if (app('laratrust')->hasPermission('clients-show')) : ?>
                              <a class="dropdown-item" href="<?php echo e(route('admin.clients.show', $client->id)); ?>">
                                <?php echo e(__('translations.show')); ?>

                              </a>
                            <?php endif; // app('laratrust')->permission ?>
                            <?php if (app('laratrust')->hasPermission('clients-edit')) : ?>
                              <a class="dropdown-item" href="<?php echo e(route('admin.clients.edit', $client->id)); ?>">
                                <?php echo e(__('translations.edit')); ?>

                              </a>
                              <a class="dropdown-item" href="#"
                                onclick="event.preventDefault();
                                      if(confirm('هل أنت متأكد من عملية الحذف ؟')) {
                                      document.getElementById('delete-form-<?php echo e($client->id); ?>').submit();
                                      }">
                                <?php echo e(__('translations.delete')); ?>

                              </a>
                              <form id="delete-form-<?php echo e($client->id); ?>"
                                action="<?php echo e(route('admin.clients.destroy', $client->id)); ?>" method="post"
                                style="display: none;">
                                <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                              </form>
                            <?php endif; // app('laratrust')->permission ?>
                          </div>
                        </td>
                      </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/opticsin/public_html/4eye.innovationstars.net/resources/views/admin/clients/index.blade.php ENDPATH**/ ?>