

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

<div class="bg-white/10 backdrop-blur-lg border border-white/10 rounded-2xl shadow-2xl p-6">

    <!-- HEADER -->
    <div class="flex justify-between items-center mb-6">
        
        <h2 class="text-2xl font-bold text-white tracking-wide">
            ⚡ CCMS Feeders
        </h2>

        <!-- ADD BUTTON -->
        <a href="<?php echo e(url('/ccms_feeders/create')); ?>"
           class="bg-gradient-to-r from-indigo-500 to-purple-600 hover:scale-105 transition text-white px-5 py-2 rounded-lg shadow-lg">
           + Add Feeder
        </a>

    </div>

    <!-- TABLE -->
    <div class="overflow-x-auto rounded-xl">

        <table class="w-full text-sm text-left text-gray-300">

            <thead class="bg-white/10 text-gray-200 uppercase text-xs tracking-wider">
                <tr>
                    <th class="px-4 py-3">Feeder</th>
                    <th class="px-4 py-3">Code</th>
                    <th class="px-4 py-3">Company</th>
                    <th class="px-4 py-3">Device</th>
                    <th class="px-4 py-3">Phase</th>
                    <th class="px-4 py-3">Status</th>
                    <th class="px-4 py-3">Subscription</th>
                    <th class="px-4 py-3 text-center">Actions</th>
                </tr>
            </thead>

            <tbody>

            <?php $__empty_1 = true; $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr class="border-b border-white/10 hover:bg-white/5 transition">

                    <!-- NAME -->
                    <td class="px-4 py-3 font-semibold text-white">
                        <?php echo e($row->name); ?>

                    </td>

                    <!-- CODE -->
                    <td class="px-4 py-3">
                        <?php echo e($row->feeder_code ?? '-'); ?>

                    </td>

                    <!-- COMPANY -->
                    <td class="px-4 py-3">
                        <?php echo e($row->company_name); ?>

                    </td>

                    <!-- DEVICE -->
                    <td class="px-4 py-3">
                        <span class="text-indigo-300 font-mono">
                            <?php echo e($row->imei); ?>

                        </span>
                    </td>

                    <!-- PHASE -->
                    <td class="px-4 py-3">
                        <span class="px-2 py-1 bg-yellow-500/20 text-yellow-300 rounded text-xs">
                            <?php echo e(ucfirst($row->phase)); ?>

                        </span>
                    </td>

                    <!-- STATUS -->
                    <td class="px-4 py-3">
                        <span class="px-2 py-1 rounded text-xs font-semibold
                            <?php echo e($row->status == 'ON' ? 'bg-green-500/20 text-green-300' : 'bg-red-500/20 text-red-300'); ?>">
                            <?php echo e($row->status); ?>

                        </span>
                    </td>

                    <!-- SUBSCRIPTION -->
                    <td class="px-4 py-3">
                        <div class="text-sm">
                            <?php echo e($row->subscription_start); ?>

                        </div>
                        <div class="text-xs text-gray-400">
                            → <?php echo e($row->subscription_due); ?>

                        </div>
                    </td>

                    <!-- ACTIONS -->
                    <td class="px-4 py-3 text-center space-x-2">

                        <!-- EDIT -->
                        <a href="<?php echo e(url('/ccms_feeders/'.$row->id.'/edit')); ?>"
                           class="px-3 py-1 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-xs shadow">
                           Edit
                        </a>

                        <!-- DELETE -->
                        <form action="<?php echo e(url('/ccms_feeders/'.$row->id)); ?>" method="POST" class="inline">
                            <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>

                            <button onclick="return confirm('Delete this feeder?')"
                                class="px-3 py-1 bg-red-600 hover:bg-red-700 text-white rounded-lg text-xs shadow">
                                Delete
                            </button>
                        </form>

                    </td>

                </tr>

            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr>
                    <td colspan="8" class="text-center py-6 text-gray-400">
                        No feeders found
                    </td>
                </tr>
            <?php endif; ?>

            </tbody>

        </table>

    </div>

</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home2/jitrealx/public_html/amccms/resources/views/ccms_feeders/index.blade.php ENDPATH**/ ?>