<?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('heading', null, []); ?> Feed Usage Report <?php $__env->endSlot(); ?>
    <div class="mb-4 flex items-center gap-2 text-sm text-gray-500">
        <a href="<?php echo e(route('reports.index')); ?>" class="hover:text-gray-700">Reports</a>
        <svg class="h-4 w-4 text-gray-300" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"/></svg>
        <span>Feed Usage</span>
    </div>

    <div class="mb-4 text-sm text-gray-600">
        <?php echo e(\Carbon\Carbon::parse($dateFrom)->format('d M Y')); ?> — <?php echo e(\Carbon\Carbon::parse($dateTo)->format('d M Y')); ?>

        &nbsp;·&nbsp; Total: <strong><?php echo e(number_format($totalKg, 1)); ?> kg</strong>
    </div>

    <div class="rounded-xl border border-gray-100 bg-white shadow-sm overflow-hidden">
        <table class="w-full text-sm">
            <thead class="bg-gray-50 text-xs uppercase tracking-wider text-gray-500">
                <tr>
                    <th class="px-5 py-3 text-left">Brand</th>
                    <th class="px-5 py-3 text-left">Type</th>
                    <th class="px-5 py-3 text-right">Total (kg)</th>
                    <th class="px-5 py-3 text-right">Sessions</th>
                    <th class="px-5 py-3 text-right">% of total</th>
                </tr>
            </thead>
            <tbody class="divide-y divide-gray-50">
                <?php $__empty_1 = true; $__currentLoopData = $feedData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $f): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td class="px-5 py-3 font-medium text-gray-900"><?php echo e($f->feed_brand); ?></td>
                    <td class="px-5 py-3 text-gray-600"><?php echo e($f->feed_type); ?></td>
                    <td class="px-5 py-3 text-right font-semibold"><?php echo e(number_format($f->total_kg, 1)); ?></td>
                    <td class="px-5 py-3 text-right text-gray-500"><?php echo e($f->sessions); ?></td>
                    <td class="px-5 py-3 text-right text-gray-500"><?php echo e($totalKg > 0 ? number_format($f->total_kg / $totalKg * 100, 1) : 0); ?>%</td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr><td colspan="5" class="px-5 py-6 text-center text-gray-400">No feeding data for this period.</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </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 C:\laragon\www\farm\resources\views\reports\feed-usage.blade.php ENDPATH**/ ?>