<?php if(request('tab') == 'bookings'): ?>
    <div class="<?php echo \Illuminate\Support\Arr::toCssClasses([
        'tab-pane fade',
        'show active' => request('tab') == 'bookings',
    ]); ?>" id="pills-bookings" role="tabpanel" aria-labelledby="pills-bookings-tab">
        <div class="row">
            <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12">
                <div class="site-card">
                    <div class="site-card-header">
                        <h4 class="title"><?php echo e(__('Bookings')); ?></h4>
                    </div>
                    <div class="site-card-body table-responsive">
                        <div class="site-table">
                            <div class="table-responsive">
                                <div class="table-filter">
                                    <form action="" method="get">
                                        <input type="hidden" name="tab" value="transactions">
                                        <div class="filter d-flex">
                                            <div class="search">
                                                <label for=""><?php echo e(__('Search:')); ?></label>
                                                <input type="text" name="query" value="<?php echo e(request('query')); ?>" />
                                            </div>
                                            <button class="apply-btn" type="submit"><i
                                                    data-lucide="search"></i><?php echo e(__('Search')); ?></button>
                                        </div>
                                    </form>
                                </div>
                                <table class="table">
                                    <thead>
                                        <tr>
                                            <th><?php echo e(__('ID')); ?></th>
                                            <th><?php echo e(__('Date')); ?></th>
                                            <th><?php echo e(__('User')); ?></th>
                                            <th><?php echo e(__('Space')); ?></th>
                                            <th><?php echo e(__('Location')); ?></th>
                                            <th><?php echo e(__('Total Amount')); ?></th>
                                            <th><?php echo e(__('Gateway')); ?></th>
                                            <th><?php echo e(__('Payment Status')); ?></th>
                                            <th><?php echo e(__('Status')); ?></th>
                                            <th><?php echo e(__('Action')); ?></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $__empty_1 = true; $__currentLoopData = $bookings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $book): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                            <tr>
                                                <td>
                                                    <?php echo e($book->booking_id); ?>

                                                </td>
                                                <td>
                                                    <?php echo e($book->created_at->format('d M Y h:i A')); ?>

                                                </td>
                                                <td>
                                                    <?php echo e($book->user->username ?? 'N/A'); ?>

                                                </td>
                                                <td>
                                                    <?php echo e($book->space->title ?? 'N/A'); ?>

                                                </td>
                                                <td>
                                                    <?php echo e($book->space->location->name ?? 'N/A'); ?>

                                                </td>
                                                <td>
                                                    <?php echo e($book->total_amount . ' ' . $currency); ?>

                                                </td>
                                                <td>
                                                    <?php echo e($book->gateway->name ?? 'N/A'); ?>

                                                </td>
                                                <td>
                                                    <div class="<?php echo \Illuminate\Support\Arr::toCssClasses([
                                                        'site-badge',
                                                        'success' => $book->is_paid,
                                                        'danger' => !$book->is_paid,
                                                    ]); ?>">
                                                        <?php echo e($book->is_paid ? __('Paid') : __('Unpaid')); ?>

                                                    </div>
                                                </td>
                                                <td>
                                                    <?php switch($book->status->value):
                                                        case ('pending'): ?>
                                                            <div class="site-badge pending"><?php echo e(__('Pending')); ?></div>
                                                        <?php break; ?>

                                                        <?php case ('booked'): ?>
                                                            <div class="site-badge success"><?php echo e(__('Booked')); ?></div>
                                                        <?php break; ?>

                                                        <?php case ('cancelled'): ?>
                                                            <div class="site-badge danger"><?php echo e(__('Cancelled')); ?></div>
                                                        <?php break; ?>
                                                    <?php endswitch; ?>
                                                </td>
                                                <td>
                                                    <a href="<?php echo e(route('admin.bookings.show', $book->booking_id)); ?>"
                                                        class="round-icon-btn blue-btn">
                                                        <i data-lucide="eye"></i>
                                                    </a>
                                                </td>
                                            </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                                <td colspan="7" class="text-center"><?php echo e(__('No Booking Found!')); ?></td>
                                            <?php endif; ?>
                                        </tbody>
                                    </table>
                                    <?php echo e($bookings->links('backend.include.__pagination')); ?>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
    <?php endif; ?>
<?php /**PATH /www/wwwroot/mxawfis.atharvatek.com/resources/views/backend/user/include/__bookings.blade.php ENDPATH**/ ?>