<?php $__env->startSection('title','Book Details'); ?>
<?php $__env->startSection('content'); ?>

<div class="row">
    <div class="col-md-12">
        <div class="tile">
            <div class="tile-title-w-btn">
                <h3 class="title"><i class="bi bi-info-circle"></i> <?php echo e(__('lang.book')); ?></h3>
                <a href="<?php echo e(route('books.index')); ?>" class="btn btn-primary" title="<?php echo e(__('lang.books')); ?>">
                    <i class='bi bi-list'></i>
                </a>
            </div>
            <div class="tile-body">
                <table class="table table-sm table-striped">
                    <tr>
                        <th>ID</th>
                        <td><?php echo e($book->id); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.title')); ?></th>
                        <td><?php echo e($book->title); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.category')); ?></th>
                        <td><?php echo e($book->category->name); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.location')); ?></th>
                        <td><?php echo e($book->location->name); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.language')); ?></th>
                        <td><?php echo e($book->language->name); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.author')); ?></th>
                        <td><?php echo e($book->author); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.translator')); ?></th>
                        <td><?php echo e($book->translator); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.publisher')); ?></th>
                        <td><?php echo e($book->publisher); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.isbn')); ?></th>
                        <td><?php echo e($book->isbn); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.price')); ?></th>
                        <td><?php echo e($book->price); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.qty')); ?></th>
                        <td><?php echo e($book->qty); ?></td>
                    </tr>
                    <tr>
                        <th><?php echo e(__('lang.available_qty')); ?></th>
                        <td><?php echo e($book->available_qty); ?></td>
                    </tr>
                </table>

                <h3><?php echo e(__('lang.borrows')); ?></h3>
                <div class="table-responsive">
                    <table class="table table-sm table-striped">
                        <thead class="table-primary">
                            <tr>
                                <th>#</th>
                                <th><?php echo e(__('lang.member')); ?></th>
                                <th><?php echo e(__('lang.phone')); ?></th>
                                <th><?php echo e(__('lang.borrow_date')); ?></th>
                                <th><?php echo e(__('lang.return_date')); ?></th>
                                <th><?php echo e(__('lang.status')); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $book->borrows; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $borrow): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($borrow->id); ?></td>
                                <td><?php echo e($borrow->member->name); ?></td>
                                <td><?php echo e($borrow->member->phone); ?></td>
                                <td><?php echo e($borrow->borrow_date); ?></td>
                                <td><?php echo e($borrow->return_date); ?></td>
                                <td>
                                    <?php if($borrow->is_returned): ?>
                                    <span class="badge bg-success"><?php echo e(__('lang.returned')); ?></span>
                                    <?php else: ?>
                                    <span class="badge bg-danger"><?php echo e(__('lang.not_returned')); ?></span>
                                    <?php endif; ?>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>

                    </table>
                </div>
                <h3><?php echo e(__('lang.wastes')); ?></h3>
                <div class="table-responsive">
                    <table class="table table-sm table-striped">
                        <thead class="table-primary">
                            <tr>
                                <th>#</th>
                                <th><?php echo e(__('lang.waste_type')); ?></th>
                                <th><?php echo e(__('lang.date')); ?></th>
                                <th><?php echo e(__('lang.details')); ?></th>
                                <th><?php echo e(__('lang.qty')); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $book->wastes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $waste): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($waste->id); ?></td>
                                <td><?php echo e($waste->waste_type); ?></td>
                                <td><?php echo e($waste->date); ?></td>
                                <td><?php echo e($waste->details); ?></td>
                                <td><?php echo e($waste->qty); ?></td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>

                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\Laravel\library\resources\views/book/show.blade.php ENDPATH**/ ?>