<?php echo $__env->make('public.booking.partials.data', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

<?php $__env->startSection('content'); ?>
    <div class="mx-auto max-w-4xl space-y-5">
        <?php if (isset($component)) { $__componentOriginaldae4cd48acb67888a4631e1ba48f2f93 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginaldae4cd48acb67888a4631e1ba48f2f93 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.ui.card','data' => ['title' => 'Reschedule Appointment','description' => 'Choose a new date and time for your existing booking.']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('ui.card'); ?>
<?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' => 'Reschedule Appointment','description' => 'Choose a new date and time for your existing booking.']); ?>
            <?php if($errors->any()): ?>
                <div class="mb-5 rounded-lg border border-red-100 bg-red-50 px-4 py-3 text-sm font-bold text-red-700">
                    <?php echo e($errors->first()); ?>

                </div>
            <?php endif; ?>

            <div class="rounded-lg border border-booklio-border bg-slate-50 p-4">
                <p class="text-xs font-bold uppercase tracking-wide text-booklio-muted">Current appointment</p>
                <p class="mt-2 text-sm font-extrabold text-booklio-dark"><?php echo e($selected['service']); ?> with <?php echo e($selected['staff']); ?></p>
                <p class="mt-1 text-sm font-semibold text-booklio-muted"><?php echo e($selected['date']); ?> at <?php echo e($selected['time']); ?> - Booking <?php echo e($selected['booking_id']); ?></p>
            </div>

            <form method="POST" action="<?php echo e(route('public.booking.reschedule.update', ['business_slug' => $businessSlug, 'token' => $token])); ?>" class="mt-5 grid gap-5 lg:grid-cols-2">
                <?php echo csrf_field(); ?>
                <div>
                    <h3 class="text-sm font-extrabold text-booklio-dark">New date</h3>
                    <div class="mt-3 grid grid-cols-3 gap-3">
                        <?php $__currentLoopData = $dateOptions->take(6); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dateOption): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <label class="cursor-pointer rounded-lg border border-booklio-border bg-white px-4 py-3 text-center text-sm font-extrabold shadow-soft hover:border-blue-200 hover:bg-blue-50">
                                <input type="radio" name="appointment_date" value="<?php echo e($dateOption['value']); ?>" class="sr-only" <?php if($loop->first): echo 'checked'; endif; ?>>
                                <?php echo e($dateOption['date']->format('M d')); ?>

                            </label>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
                <div>
                    <h3 class="text-sm font-extrabold text-booklio-dark">New time</h3>
                    <div class="mt-3 grid grid-cols-2 gap-3">
                        <?php $__empty_1 = true; $__currentLoopData = $slotGroups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group => $slots): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <?php $__currentLoopData = $slots; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $slotValue => $slotLabel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <label class="cursor-pointer rounded-lg border border-booklio-border bg-white px-4 py-3 text-center text-sm font-extrabold shadow-soft hover:border-blue-200 hover:bg-blue-50">
                                    <input type="radio" name="appointment_time" value="<?php echo e($slotValue); ?>" class="sr-only" <?php if($loop->parent->first && $loop->first): echo 'checked'; endif; ?>>
                                    <?php echo e($slotLabel); ?>

                                </label>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <p class="rounded-lg border border-dashed border-booklio-border bg-slate-50 p-4 text-sm font-semibold text-booklio-muted">No slots available today.</p>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="grid gap-3 sm:grid-cols-2 lg:col-span-2">
                    <?php if (isset($component)) { $__componentOriginala8bb031a483a05f647cb99ed3a469847 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala8bb031a483a05f647cb99ed3a469847 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.ui.button','data' => ['type' => 'submit']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('ui.button'); ?>
<?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(['type' => 'submit']); ?>Confirm reschedule <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala8bb031a483a05f647cb99ed3a469847)): ?>
<?php $attributes = $__attributesOriginala8bb031a483a05f647cb99ed3a469847; ?>
<?php unset($__attributesOriginala8bb031a483a05f647cb99ed3a469847); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala8bb031a483a05f647cb99ed3a469847)): ?>
<?php $component = $__componentOriginala8bb031a483a05f647cb99ed3a469847; ?>
<?php unset($__componentOriginala8bb031a483a05f647cb99ed3a469847); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginala8bb031a483a05f647cb99ed3a469847 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala8bb031a483a05f647cb99ed3a469847 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.ui.button','data' => ['variant' => 'secondary','href' => ''.e(route('public.booking.confirmation', ['business_slug' => $businessSlug, 'token' => $appointment->reschedule_token])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('ui.button'); ?>
<?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(['variant' => 'secondary','href' => ''.e(route('public.booking.confirmation', ['business_slug' => $businessSlug, 'token' => $appointment->reschedule_token])).'']); ?>Keep current booking <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala8bb031a483a05f647cb99ed3a469847)): ?>
<?php $attributes = $__attributesOriginala8bb031a483a05f647cb99ed3a469847; ?>
<?php unset($__attributesOriginala8bb031a483a05f647cb99ed3a469847); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala8bb031a483a05f647cb99ed3a469847)): ?>
<?php $component = $__componentOriginala8bb031a483a05f647cb99ed3a469847; ?>
<?php unset($__componentOriginala8bb031a483a05f647cb99ed3a469847); ?>
<?php endif; ?>
                </div>
            </form>
         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginaldae4cd48acb67888a4631e1ba48f2f93)): ?>
<?php $attributes = $__attributesOriginaldae4cd48acb67888a4631e1ba48f2f93; ?>
<?php unset($__attributesOriginaldae4cd48acb67888a4631e1ba48f2f93); ?>
<?php endif; ?>
<?php if (isset($__componentOriginaldae4cd48acb67888a4631e1ba48f2f93)): ?>
<?php $component = $__componentOriginaldae4cd48acb67888a4631e1ba48f2f93; ?>
<?php unset($__componentOriginaldae4cd48acb67888a4631e1ba48f2f93); ?>
<?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.public-booking', ['title' => 'Reschedule Appointment - Booklio'], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\Dcodax\Documents\Booklio\resources\views/public/booking/reschedule.blade.php ENDPATH**/ ?>