

<?php $__env->startSection('content'); ?>
<div class="container">
    <div class="container-header">
        <h1><?php echo e($title); ?></h1>
    </div>

    <div class="card mb-25">
        <div class="card-body">
            <form method="get" class="filter-form">
                <div class="row">
                    <div class="form-group width-33">
                        <label class="form-label">Status</label>
                        <select name="status" class="form-control">
                            <option value="">All</option>
                            <option value="0" <?php echo e(request('status') === '0' ? 'selected' : ''); ?>>Pending</option>
                            <option value="1" <?php echo e(request('status') === '1' ? 'selected' : ''); ?>>Active</option>
                            <option value="2" <?php echo e(request('status') === '2' ? 'selected' : ''); ?>>Completed</option>
                            <option value="3" <?php echo e(request('status') === '3' ? 'selected' : ''); ?>>Cancelled</option>
                        </select>
                    </div>
                    <div class="form-group width-33" style="margin-top: 26px;">
                        <button class="btn btn-primary" type="submit">Filter</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <div class="card table-card">
        <div class="table-header">
            <form method="get" action="<?php echo e(route('backend.logs.numbers')); ?>" class="table-search-form">
                <?php if(request('status') !== null && request('status') !== ''): ?><input type="hidden" name="status" value="<?php echo e(request('status')); ?>"><?php endif; ?>
                <div class="table-search">
                    <input type="text" name="search" class="search-input" placeholder="Search by number, service, user..." value="<?php echo e($search ?? ''); ?>">
                    <i class="las la-search"></i>
                </div>
                <button type="submit" class="btn btn-secondary search-btn">Search</button>
                <?php if(!empty($search)): ?>
                    <a href="<?php echo e(route('backend.logs.numbers', request()->only('status'))); ?>" class="btn btn-outline">Clear</a>
                <?php endif; ?>
            </form>
        </div>
        <div class="table-responsive">
            <table class="table">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>User</th>
                        <th>Number</th>
                        <th>Service</th>
                        <th>Server</th>
                        <th>Price</th>
                        <th>Status</th>
                        <th>SMS</th>
                        <th>Buy time</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $numbers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td><?php echo e($numbers->firstItem() + $loop->index); ?></td>
                            <td><?php echo e($row->user?->email ?? 'N/A'); ?></td>
                            <td><?php echo e($row->number); ?></td>
                            <td><?php echo e($row->service_name ?? $row->service_id); ?></td>
                            <td><?php echo e($row->server_id); ?></td>
                            <td><?php echo e(number_format($row->service_price, 2)); ?></td>
                            <td><?php echo e($row->status); ?></td>
                            <td><?php echo e(\Illuminate\Support\Str::limit($row->sms_text ?? '-', 40)); ?></td>
                            <td><?php echo e($row->buy_time?->format('Y-m-d H:i')); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr><td colspan="9" class="text-center">No numbers found.</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>

        <?php if($numbers instanceof \Illuminate\Pagination\LengthAwarePaginator): ?>
            <div class="pagination-wrapper">
                <?php echo e($numbers->links('vendor.pagination.default')); ?>

            </div>
        <?php endif; ?>
    </div>
</div>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('backend.layout.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\HP\Desktop\nbverify\mine\resources\views/backend/logs/numbers.blade.php ENDPATH**/ ?>