<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex items-center justify-between gap-4 rounded-2xl border border-sky-200/70 bg-gradient-to-r from-sky-50 to-green-50 px-5 py-4">
            <h2 class="text-xl font-semibold leading-tight text-sky-900">
                <?php echo e(__('Packages')); ?>

            </h2>
            <a href="<?php echo e(route('admin.packages.create')); ?>"
                class="inline-flex items-center rounded-lg bg-sky-600 px-4 py-2 font-semibold text-white transition hover:bg-sky-700">
                + <?php echo e(__('New Package')); ?>

            </a>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            <?php if($message = Session::get('success')): ?>
                <div class="mb-4 rounded-lg border border-green-200 bg-green-50 p-4 text-green-700">
                    <?php echo e($message); ?>

                </div>
            <?php endif; ?>

            <?php if($errors->any()): ?>
                <div class="mb-4 rounded-lg border border-red-200 bg-red-50 p-4 text-red-700">
                    <ul>
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li><?php echo e($error); ?></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </div>
            <?php endif; ?>

            <div class="overflow-hidden rounded-2xl border border-sky-200/70 bg-white shadow-sm">
                <div class="overflow-x-auto">
                    <table class="w-full">
                        <thead class="border-b border-sky-100 bg-sky-50/80">
                            <tr>
                                <th class="px-6 py-3 text-left text-sm font-semibold text-sky-800"><?php echo e(__('Name')); ?></th>
                                <th class="px-6 py-3 text-left text-sm font-semibold text-sky-800"><?php echo e(__('Drivers')); ?></th>
                                <th class="px-6 py-3 text-left text-sm font-semibold text-sky-800"><?php echo e(__('Trucks')); ?></th>
                                <th class="px-6 py-3 text-left text-sm font-semibold text-sky-800"><?php echo e(__('Base Price')); ?></th>
                                <th class="px-6 py-3 text-left text-sm font-semibold text-sky-800"><?php echo e(__('Per Driver')); ?></th>
                                <th class="px-6 py-3 text-left text-sm font-semibold text-sky-800"><?php echo e(__('Legacy Price')); ?></th>
                                <th class="px-6 py-3 text-left text-sm font-semibold text-sky-800"><?php echo e(__('Billing')); ?></th>
                                <th class="px-6 py-3 text-left text-sm font-semibold text-sky-800"><?php echo e(__('Status')); ?></th>
                                <th class="px-6 py-3 text-left text-sm font-semibold text-sky-800"><?php echo e(__('Actions')); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__empty_1 = true; $__currentLoopData = $packages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $package): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <tr class="border-b border-sky-100 hover:bg-sky-50/40">
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <a href="<?php echo e(route('admin.packages.show', $package)); ?>"
                                            class="font-semibold text-sky-700 hover:text-sky-900">
                                            <?php echo e($package->name); ?>

                                        </a>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm">
                                        <?php echo e($package->driver_limit); ?>

                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm">
                                        <?php echo e($package->truck_limit); ?>

                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-semibold text-gray-900">
                                        $<?php echo e(number_format($package->base_price ?? 0, 2)); ?>

                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-semibold text-gray-900">
                                        $<?php echo e(number_format($package->price_per_driver ?? 0, 2)); ?>

                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-semibold">
                                        $<?php echo e(number_format($package->price, 2)); ?>

                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm">
                                        <span class="rounded-full bg-sky-100 px-3 py-1 text-xs font-semibold text-sky-800">
                                            <?php echo e($package->billing_cycle); ?>

                                        </span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm">
                                        <?php if($package->is_active): ?>
                                            <span class="px-3 py-1 bg-green-100 text-green-800 rounded-full text-xs font-semibold">
                                                <?php echo e(__('Active')); ?>

                                            </span>
                                        <?php else: ?>
                                            <span class="px-3 py-1 bg-gray-100 text-gray-800 rounded-full text-xs font-semibold">
                                                <?php echo e(__('Inactive')); ?>

                                            </span>
                                        <?php endif; ?>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm">
                                        <a href="<?php echo e(route('admin.packages.edit', $package)); ?>"
                                            class="mr-2 inline-block rounded bg-yellow-600 px-3 py-1 text-white hover:bg-yellow-700">
                                            <?php echo e(__('Edit')); ?>

                                        </a>
                                        <form action="<?php echo e(route('admin.packages.destroy', $package)); ?>" method="POST" class="inline"
                                            onsubmit="return confirm('<?php echo e(__('Are you sure?')); ?>');">
                                            <?php echo csrf_field(); ?>
                                            <?php echo method_field('DELETE'); ?>
                                            <button type="submit"
                                                class="px-3 py-1 bg-red-600 text-white rounded hover:bg-red-700">
                                                <?php echo e(__('Delete')); ?>

                                            </button>
                                        </form>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <tr>
                                    <td colspan="9" class="px-6 py-4 text-center text-sky-700/80">
                                        <?php echo e(__('No packages found')); ?>

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

                <?php if($packages->hasPages()): ?>
                    <div class="border-t border-sky-100 bg-sky-50/50 px-6 py-4">
                        <?php echo e($packages->links()); ?>

                    </div>
                <?php endif; ?>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH D:\true-trucker\web\resources\views/admin/packages/index.blade.php ENDPATH**/ ?>