<?php $__env->startSection('content'); ?>
<?php if(session('success')): ?>
<div class="alert alert-primary alert-dismissible" role="alert">
    <?php echo e(session('success')); ?>

    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
    </button>
</div>
<?php endif; ?>
<div class="content-wrapper">
    <div class="container-xxl flex-grow-1 container-p-y">
        <h4 class="fw-bold py-3 mb-4 px-3">
            <span class="text-muted fw-light"><a
                    href="<?php echo e(route($parent_named_route.'.index')); ?>"><?php echo e($module_name); ?></a>
                /</span> Edit
        </h4>
        <div class="row">
            <div class="col-md-12">
                <div class="card mb-4">
                    <div class="card-body">
                        <form action="<?php echo e(route('events.edit', ['id' => $event->id])); ?>" class="mb-3" method="POST" enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            <div>
                                <label for="defaultFormControlInput" class="form-label">Club</label>
                                <select name="club_id" class="form-control" id="defaultFormControlInput" aria-describedby="defaultFormControlHelp">
                                    <?php $__currentLoopData = $clubs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $club): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($club->id); ?>" <?php echo e($event->club_id == $club->id ? 'selected' : ''); ?>><?php echo e($club->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                            <div>
                                <label for="defaultFormControlInput" class="form-label">name</label>
                                <input name="name" type="text" class="form-control" id="defaultFormControlInput"
                                    placeholder="Club Name" value="<?php echo e($event->name); ?>" aria-describedby="defaultFormControlHelp" />
                                <?php if($errors->has('name')): ?>
                                <span class="text-danger"><?php echo e($errors->first('name')); ?></span>
                                <?php endif; ?>
                            </div>
                            <div>
                                <label for="defaultFormControlInput" class="form-label">slug</label>
                                <input name="slug" type="text" class="form-control" id="defaultFormControlInput"
                                    placeholder="New York" value="<?php echo e($event->slug); ?>" aria-describedby="defaultFormControlHelp" />
                                <?php if($errors->has('slug')): ?>
                                <span class="text-danger"><?php echo e($errors->first('slug')); ?></span>
                                <?php endif; ?>
                            </div>
                            <div>
                                <label for="defaultFormControlInput" class="form-label">picture</label>
                                <input name="picture" type="file" class="form-control" id="defaultFormControlInput"
                                    placeholder="New York" value="<?php echo e($event->picture); ?>" aria-describedby="defaultFormControlHelp" />
                                <img src="<?php echo e($event->picture); ?>" height="50px" width="100px">
                                <span class="text-info"><?php echo e(str_replace(env('UPLOAD_URL').'events/', '', $event->picture)); ?></span>
                                <?php if($errors->has('picture')): ?>
                                <span class="text-danger"><?php echo e($errors->first('picture')); ?></span>
                                <?php endif; ?>
                            </div>
                            <div>
                                <label for="defaultFormControlInput" class="form-label">Start Date</label>
                                <input
                                    name="start_date"
                                    type="date"
                                    class="form-control"
                                    value="<?php echo e($event->start_date ? $event->start_date->format('Y-m-d') : ''); ?>"
                                    aria-describedby="defaultFormControlHelp" />
                                <?php if($errors->has('start_date')): ?>
                                <span class="text-danger"><?php echo e($errors->first('start_date')); ?></span>
                                <?php endif; ?>
                            </div>

                            <div>
                                <label for="defaultFormControlInput" class="form-label">End Date</label>
                                <input
                                    name="end_date"
                                    type="date"
                                    class="form-control"
                                    value="<?php echo e($event->end_date ? $event->end_date->format('Y-m-d') : ''); ?>"
                                    aria-describedby="defaultFormControlHelp" />
                                <?php if($errors->has('end_date')): ?>
                                <span class="text-danger"><?php echo e($errors->first('end_date')); ?></span>
                                <?php endif; ?>
                            </div>

                            <div>
                                <label for="longitudeInput" class="form-label">Start Time</label>
                                <input
                                    name="start_time"
                                    type="time"
                                    class="form-control"
                                    value="<?php echo e($event->start_time ? $event->start_time->format('H:i') : ''); ?>"
                                    aria-describedby="defaultFormControlHelp" />
                                <?php if($errors->has('start_time')): ?>
                                <span class="text-danger"><?php echo e($errors->first('start_time')); ?></span>
                                <?php endif; ?>
                            </div>

                            <div>
                                <label for="longitudeInput" class="form-label">End Time</label>
                                <input
                                    name="end_time"
                                    type="time"
                                    class="form-control"
                                    id="longitudeInput"
                                    value="<?php echo e($event->end_time ? $event->end_time->format('H:i') : ''); ?>"
                                    aria-describedby="defaultFormControlHelp" />
                                <?php if($errors->has('end_time')): ?>
                                <span class="text-danger"><?php echo e($errors->first('end_time')); ?></span>
                                <?php endif; ?>
                            </div>

                            <div>
                                <label for="exampleFormControlTextarea1" class="form-label">Description</label>
                                <textarea name="description" class="form-control" id="exampleFormControlTextarea1"
                                    rows="3" placeholder="We are please to announce that..."><?php echo e($event->description); ?></textarea>
                                <?php if($errors->has('description')): ?>
                                <span
                                    class="text-danger"><?php echo e($errors->first('description')); ?></span>
                                <?php endif; ?>
                            </div>
                            <div>
                                <label for="defaultFormControlInput" class="form-label">Status</label>
                                <select name="status" class="form-control" id="defaultFormControlInput" aria-describedby="defaultFormControlHelp">
                                    <option value="0">Pending</option>
                                    <option value="1">Active</option>
                                    <option value="3">Finished</option>
                                </select>
                            </div>
                            <div class="demo-inline-spacing">
                                <input type="submit" class="btn btn-primary move-right" value="Update" />
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- / Content -->
    <?php $__env->stopSection(); ?>

    <?php $__env->startSection('scripts'); ?>
    <?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/democmolds1/public_html/projects/pblink_admin_2024/resources/views/pages/event/edit.blade.php ENDPATH**/ ?>