<?php $__env->startSection('title', __('dashboard.court_details')); ?>

<?php $__env->startSection('content'); ?>
<?php if (isset($component)) { $__componentOriginalcb19cb35a534439097b02b8af91726ee = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalcb19cb35a534439097b02b8af91726ee = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.page-header','data' => ['title' => ''.e(__('dashboard.court_details')).'','breadcrumbs' => [__('dashboard.courts') => route('admin.courts.index'), __('dashboard.details') => '']]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.page-header'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => ''.e(__('dashboard.court_details')).'','breadcrumbs' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute([__('dashboard.courts') => route('admin.courts.index'), __('dashboard.details') => ''])]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalcb19cb35a534439097b02b8af91726ee)): ?>
<?php $attributes = $__attributesOriginalcb19cb35a534439097b02b8af91726ee; ?>
<?php unset($__attributesOriginalcb19cb35a534439097b02b8af91726ee); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalcb19cb35a534439097b02b8af91726ee)): ?>
<?php $component = $__componentOriginalcb19cb35a534439097b02b8af91726ee; ?>
<?php unset($__componentOriginalcb19cb35a534439097b02b8af91726ee); ?>
<?php endif; ?>

<div class="row justify-content-center">
    <div class="col-xl-12">
        <div class="card bg-primary bg-gradient mb-4">
            <div class="card-body">
                <div class="d-flex align-items-center">
                    <div class="avatar-lg bg-white bg-opacity-25 rounded d-flex align-items-center justify-content-center me-4" style="width: 80px; height: 80px;">
                        <?php if($court->image): ?>
                            <img src="<?php echo e(asset('storage/' . $court->image)); ?>" alt="<?php echo e($court->name); ?>" class="rounded" style="width: 100%; height: 100%; object-fit: cover;">
                        <?php else: ?>
                            <i class="ri-map-pin-line text-white fs-1"></i>
                        <?php endif; ?>
                    </div>
                    <div>
                        <h3 class="mb-1 text-white"><?php echo e($court->name); ?></h3>
                        <p class="text-white-50 mb-0"><?php echo e($court->game?->name ?? '-'); ?></p>
                    </div>
                    <div class="ms-auto text-end">
                        <?php if($court->is_active): ?>
                            <span class="badge bg-success"><?php echo e(__('dashboard.active')); ?></span>
                        <?php else: ?>
                            <span class="badge bg-danger"><?php echo e(__('dashboard.inactive')); ?></span>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>

        <div class="card mb-4">
            <div class="card-header">
                <h5 class="card-title mb-0"><?php echo e(__('dashboard.general_info')); ?></h5>
            </div>
            <div class="card-body">
                <div class="row">
                    <?php if (isset($component)) { $__componentOriginal40a0879f2990b42acf60bffd404c55f9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal40a0879f2990b42acf60bffd404c55f9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.view-col','data' => ['label' => ''.e(__('dashboard.id')).'','value' => $court->id]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('view-col'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['label' => ''.e(__('dashboard.id')).'','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($court->id)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $attributes = $__attributesOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $component = $__componentOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__componentOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal40a0879f2990b42acf60bffd404c55f9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal40a0879f2990b42acf60bffd404c55f9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.view-col','data' => ['label' => ''.e(__('dashboard.name')).'','value' => $court->name]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('view-col'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['label' => ''.e(__('dashboard.name')).'','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($court->name)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $attributes = $__attributesOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $component = $__componentOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__componentOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal40a0879f2990b42acf60bffd404c55f9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal40a0879f2990b42acf60bffd404c55f9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.view-col','data' => ['label' => ''.e(__('dashboard.game')).'','value' => $court->game?->name ?? '-']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('view-col'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['label' => ''.e(__('dashboard.game')).'','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($court->game?->name ?? '-')]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $attributes = $__attributesOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $component = $__componentOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__componentOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal40a0879f2990b42acf60bffd404c55f9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal40a0879f2990b42acf60bffd404c55f9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.view-col','data' => ['label' => ''.e(__('dashboard.description')).'','value' => $court->description ?? '-']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('view-col'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['label' => ''.e(__('dashboard.description')).'','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($court->description ?? '-')]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $attributes = $__attributesOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $component = $__componentOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__componentOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal40a0879f2990b42acf60bffd404c55f9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal40a0879f2990b42acf60bffd404c55f9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.view-col','data' => ['label' => ''.e(__('dashboard.created_at')).'','value' => $court->created_at]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('view-col'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['label' => ''.e(__('dashboard.created_at')).'','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($court->created_at)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $attributes = $__attributesOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $component = $__componentOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__componentOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginal40a0879f2990b42acf60bffd404c55f9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal40a0879f2990b42acf60bffd404c55f9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.view-col','data' => ['label' => ''.e(__('dashboard.updated_at')).'','value' => $court->updated_at]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('view-col'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['label' => ''.e(__('dashboard.updated_at')).'','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($court->updated_at)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $attributes = $__attributesOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__attributesOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal40a0879f2990b42acf60bffd404c55f9)): ?>
<?php $component = $__componentOriginal40a0879f2990b42acf60bffd404c55f9; ?>
<?php unset($__componentOriginal40a0879f2990b42acf60bffd404c55f9); ?>
<?php endif; ?>
                </div>
            </div>
        </div>

        
        <div class="card mb-4">
            <div class="card-header d-flex justify-content-between align-items-center flex-wrap gap-2">
                <h5 class="card-title mb-0">
                    <i class="ri-time-line me-1"></i><?php echo e(__('dashboard.slots')); ?>

                </h5>
                <div class="d-flex align-items-center gap-2">
                    <input type="date" id="slot-date-filter" class="form-control form-control-sm" style="width:160px" value="<?php echo e(now()->toDateString()); ?>">
                    <input type="hidden" id="slot-court-filter" value="<?php echo e($court->id); ?>">
                    <a href="<?php echo e(route('admin.slots.index')); ?>?court_id=<?php echo e($court->id); ?>" class="btn btn-sm btn-soft-primary">
                        <?php echo e(__('dashboard.view_all')); ?>

                    </a>
                </div>
            </div>
            <div class="card-body">
                <div class="table-responsive custom-scrollbar server-side-table">
                    <?php echo $dataTable->table(['class' => 'table table-bordered', 'id' => 'slots-table']); ?>

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

<?php $__env->startPush('scripts'); ?>
<?php echo $dataTable->scripts(); ?>

<script>
document.addEventListener('DOMContentLoaded', function () {
    const table = $('#slots-table').DataTable();

    // The filter elements will be automatically picked up by dtFilters 
    // when 'draw' happens.
    $('#slot-date-filter').on('change', function () {
        table.draw();
    });
});
</script>
<?php $__env->stopPush(); ?>


<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/takwgzfj/montsportscamp.com/resources/views/admin/courts/show.blade.php ENDPATH**/ ?>