

<?php $__env->startSection('content'); ?>
<div class="container-xxl flex-grow-1 container-p-y">
    <div class="card">
        <div class="card-header">
            <h5>Animal Details</h5>
        </div>

        <div class="card-body">
            <table class="table table-bordered">
                <tr>
                    <th>Name</th>
                    <td><?php echo e($animal->animal_name); ?></td>
                </tr>

                <tr>
                    <th>Category</th>
                    <td><?php echo e($animal->category->title ?? 'N/A'); ?></td>
                </tr>

                <tr>
                    <th>Buy Date</th>
                    <td><?php echo e($animal->buy_date ?? 'N/A'); ?></td>
                </tr>

                <tr>
                    <th>Buy Price</th>
                    <td><?php echo e($animal->buy_price); ?></td>
                </tr>

                <tr>
                    <th>Sale Date</th>
                    <td><?php echo e($animal->sale_date ?? 'N/A'); ?></td>
                </tr>

                <tr>
                    <th>Sale Price</th>
                    <td><?php echo e($animal->sale_price); ?></td>
                </tr>

                <tr>
                    <th>Breed</th>
                    <td><?php echo e($animal->breed ?? 'N/A'); ?></td>
                </tr>

                <tr>
                    <th>Weight</th>
                    <td><?php echo e($animal->weight ?? 'N/A'); ?></td>
                </tr>

                <tr>
                    <th>Tag Number</th>
                    <td><?php echo e($animal->tag_number ?? 'N/A'); ?></td>
                </tr>

                <tr>
                    <th>Notes</th>
                    <td><?php echo e($animal->notes ?? 'N/A'); ?></td>
                </tr>
            </table>

            <hr>

            <h6>Animal Images</h6>

            <div class="d-flex flex-wrap gap-3">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $animal->images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $img): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <div class="border rounded p-2 text-center">
                        <img src="<?php echo e(asset($img->image)); ?>"
                             width="130"
                             height="130"
                             style="object-fit:cover;border-radius:8px;">

                        <div class="mt-2">
                            <a href="<?php echo e(asset($img->image)); ?>"
                               target="_blank"
                               class="btn btn-sm btn-info">
                                View
                            </a>

                            <form action="<?php echo e(route('animal-images.destroy', $img->id)); ?>"
                                  method="POST"
                                  class="d-inline"
                                  onsubmit="return confirm('Delete this image?')">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('DELETE'); ?>

                                <button type="submit" class="btn btn-sm btn-danger">
                                    Delete
                                </button>
                            </form>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <p>No images uploaded.</p>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </div>

            <a href="<?php echo e(route('animals.index')); ?>" class="btn btn-secondary mt-4">Back</a>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\xampp\htdocs\Cattle-Farm-Management-System\resources\views/animals/show.blade.php ENDPATH**/ ?>