<?php $__env->startSection('content'); ?>

    <div class="bg-white rounded-2xl shadow-soft border border-primary-100 overflow-hidden">
        <div class="overflow-x-auto">
            <table class="w-full text-sm">
                <thead>
                    <tr class="bg-gradient-to-r from-primary-900 to-primary-700 text-primary-100">
                        <th class="px-5 py-4 text-left text-xs font-semibold uppercase tracking-wider"><?php echo app('translator')->get('S.N.'); ?></th>
                        <th class="px-5 py-4 text-left text-xs font-semibold uppercase tracking-wider"><?php echo app('translator')->get('Subject'); ?></th>
                        <th class="px-5 py-4 text-left text-xs font-semibold uppercase tracking-wider"><?php echo app('translator')->get('Status'); ?></th>
                        <th class="px-5 py-4 text-left text-xs font-semibold uppercase tracking-wider"><?php echo app('translator')->get('Priority'); ?></th>
                        <th class="px-5 py-4 text-left text-xs font-semibold uppercase tracking-wider"><?php echo app('translator')->get('Last Reply'); ?></th>
                        <th class="px-5 py-4 text-left text-xs font-semibold uppercase tracking-wider"><?php echo app('translator')->get('Action'); ?></th>
                    </tr>
                </thead>
                <tbody class="divide-y divide-primary-100">
                    <?php $__empty_1 = true; $__currentLoopData = $supports; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $support): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr class="hover:bg-primary-50 transition-colors duration-150">

                            
                            <td class="px-5 py-4 text-primary-400 font-medium">
                                <?php echo e($loop->index + $supports->firstItem()); ?>

                            </td>

                            
                            <td class="px-5 py-4">
                                <a href="<?php echo e(route('ticket.view', $support->ticket)); ?>"
                                   class="font-bold text-primary-800 hover:text-primary-600 transition-colors duration-150">
                                    [<?php echo app('translator')->get('Ticket'); ?>#<?php echo e($support->ticket); ?>] <?php echo e(__($support->subject)); ?>

                                </a>
                            </td>

                            
                            <td class="px-5 py-4">
                                <?php echo $support->statusBadge; ?>
                            </td>

                            
                            <td class="px-5 py-4">
                                <?php if($support->priority == Status::PRIORITY_LOW): ?>
                                    <span class="inline-flex items-center px-2.5 py-1 rounded-lg text-xs font-semibold bg-primary-100 text-primary-700">
                                        <?php echo app('translator')->get('Low'); ?>
                                    </span>
                                <?php elseif($support->priority == Status::PRIORITY_MEDIUM): ?>
                                    <span class="inline-flex items-center px-2.5 py-1 rounded-lg text-xs font-semibold bg-amber-100 text-amber-700">
                                        <?php echo app('translator')->get('Medium'); ?>
                                    </span>
                                <?php elseif($support->priority == Status::PRIORITY_HIGH): ?>
                                    <span class="inline-flex items-center px-2.5 py-1 rounded-lg text-xs font-semibold bg-accent-100 text-accent-700">
                                        <?php echo app('translator')->get('High'); ?>
                                    </span>
                                <?php endif; ?>
                            </td>

                            
                            <td class="px-5 py-4 text-primary-600 font-medium">
                                <?php echo e(diffForHumans($support->last_reply)); ?>

                            </td>

                            
                            <td class="px-5 py-4">
                                <a href="<?php echo e(route('ticket.view', $support->ticket)); ?>"
                                   class="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold border-2 border-primary-700 text-primary-700 hover:bg-primary-700 hover:text-white transition-all duration-200">
                                    <i class="la la-desktop"></i> <?php echo app('translator')->get('View'); ?>
                                </a>
                            </td>

                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="100%" class="px-5 py-12 text-center text-primary-400 font-medium">
                                <?php echo e(__($emptyMessage)); ?>

                            </td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>

    
    <?php if($supports->hasPages()): ?>
        <div class="mt-5">
            <?php echo e(paginateLinks($supports)); ?>

        </div>
    <?php endif; ?>

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

<?php $__env->startPush('bottom-menu'); ?>
    <div class="w-full order-4 lg:order-3">
        <div class="flex items-center gap-2 md:gap-3">

            <a href="<?php echo e(route('ticket.index')); ?>"
               class="px-5 py-2.5 rounded-xl text-sm font-semibold bg-primary-900 text-white border-2 border-primary-900 hover:bg-primary-700 hover:border-primary-700 transition-all duration-200 shadow-glow">
                <?php echo app('translator')->get('My Tickets'); ?>
            </a>

            <a href="<?php echo e(route('ticket.open')); ?>"
               class="px-5 py-2.5 rounded-xl text-sm font-semibold border-2 border-primary-700 text-primary-700 hover:bg-primary-700 hover:text-white transition-all duration-200">
                <?php echo app('translator')->get('Open New Ticket'); ?>
            </a>

        </div>
    </div>
<?php $__env->stopPush(); ?>
<?php echo $__env->make($activeTemplate . 'layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\itrevosbank\core\resources\views/templates/crystal_sky/user/support/index.blade.php ENDPATH**/ ?>