<?php $__env->startSection('title', __('nav.customers')); ?>
<?php $__env->startSection('content'); ?>
<div class="d-flex justify-content-between mb-3">
    <h1 class="h4 mb-0"><?php echo e(__('nav.customers')); ?></h1>
    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('customers.create')): ?><a class="btn btn-success" href="<?php echo e(route('customers.create')); ?>"><?php echo e(__('messages.create')); ?></a><?php endif; ?>
</div>
<form class="row g-2 mb-3">
    <div class="col-md-4"><input class="form-control" name="q" value="<?php echo e(request('q')); ?>" placeholder="<?php echo e(__('messages.search')); ?>"></div>
    <div class="col-md-2">
        <select class="form-select" name="customer_type">
            <option value=""><?php echo e(__('messages.customer_type')); ?></option>
            <option value="individual" <?php if(request('customer_type')==='individual'): echo 'selected'; endif; ?>><?php echo e(__('status.customer_individual')); ?></option>
            <option value="company" <?php if(request('customer_type')==='company'): echo 'selected'; endif; ?>><?php echo e(__('status.customer_company')); ?></option>
        </select>
    </div>
    <div class="col-md-2"><button class="btn btn-outline-secondary"><?php echo e(__('messages.filter')); ?></button></div>
</form>
<div class="card"><div class="table-responsive">
<table class="table compact-table mb-0">
    <thead><tr>
        <th><?php echo e(__('messages.name')); ?></th><th><?php echo e(__('messages.phone')); ?></th>
        <th><?php echo e(__('messages.customer_type')); ?></th><th><?php echo e(__('nav.lines')); ?></th>
        <th><?php echo e(__('messages.status')); ?></th><th></th>
    </tr></thead>
    <tbody>
    <?php $__empty_1 = true; $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <tr>
            <td><a href="<?php echo e(route('customers.show',$c)); ?>"><?php echo e($c->name); ?></a></td>
            <td><?php echo e($c->phone); ?></td>
            <td><?php echo e($c->customer_type->label()); ?></td>
            <td><?php echo e($c->lines_count); ?></td>
            <td><?php echo e($c->status->label()); ?></td>
            <td><?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('customers.edit')): ?><a href="<?php echo e(route('customers.edit',$c)); ?>"><?php echo e(__('messages.edit')); ?></a><?php endif; ?></td>
        </tr>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <tr><td colspan="6"><?php echo e(__('messages.no_results')); ?></td></tr>
    <?php endif; ?>
    </tbody>
</table></div>
<?php echo $__env->make('partials.pagination', ['paginator' => $customers], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\esim\resources\views/customers/index.blade.php ENDPATH**/ ?>