<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('frontend.components.accordion', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="card mp-20">
        <h2 class="title">Order Log</h2>
        <div class="table-header">
            <form method="GET" action="<?php echo e(route('user.log.smm-orders')); ?>" class="table-search-form">
                <div class="table-search">
                    <input type="text" name="search" class="search-input" placeholder="Search by link, service, status..." value="<?php echo e($search ?? ''); ?>">
                    <i class="ti ti-search"></i>
                </div>
                <button type="submit" class="btn btn-secondary search-btn"><i class="ti ti-search"></i> Search</button>
                <?php if(!empty($search)): ?>
                    <a href="<?php echo e(route('user.log.smm-orders')); ?>" class="btn btn-outline">Clear</a>
                <?php endif; ?>
            </form>
        </div>
        <div class="table-responsive">
            <table class="table">
                <thead>
                    <tr>
                        <th>Date</th>
                        <th>ID</th>
                        <th>Service</th>
                        <th>Link</th>
                        <th>Quantity</th>
                        <th>Charge</th>
                        <th>Status</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td><?php echo e($order->created_at?->format('Y-m-d H:i')); ?></td>
                            <td>#<?php echo e($order->id); ?></td>
                            <td><?php echo e($order->smmService?->name ?? '—'); ?></td>
                            <td title="<?php echo e($order->link); ?>"><?php echo e(Str::limit($order->link, 35)); ?></td>
                            <td><?php echo e(number_format($order->quantity)); ?></td>
                            <td><?php echo e(number_format($order->charge, 2)); ?></td>
                            <td><span class="badge badge-<?php echo e($order->status); ?>"><?php echo e(ucfirst($order->status)); ?></span></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="7" class="text-center">No orders yet.</td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
        <?php if($orders->hasPages()): ?>
            <?php echo e($orders->links('vendor.pagination.default')); ?>

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

<?php echo $__env->make('frontend.layout.dash', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\HP\Desktop\social\product\core\resources\views/frontend/user/log/smm-orders.blade.php ENDPATH**/ ?>