<?php ($club = $club ?? null); ?>
<div style="display:grid; grid-template-columns: repeat(2, 1fr); gap:16px;">
    <div class="form-group"><label class="form-label" for="name">Club Name</label><input class="input" id="name" name="name" value="<?php echo e(old('name', $club?->name)); ?>" required></div>
    <div class="form-group"><label class="form-label" for="code">Code</label><input class="input" id="code" name="code" value="<?php echo e(old('code', $club?->code)); ?>" required></div>
    <div class="form-group"><label class="form-label" for="category">Category</label>
        <select class="input" id="category" name="category"><option value="">—</option><?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($cat); ?>" <?php if(old('category', $club?->category) === $cat): echo 'selected'; endif; ?>><?php echo e(ucfirst($cat)); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select>
    </div>
    <div class="form-group"><label class="form-label" for="patron_id">Patron (Staff)</label>
        <select class="input" id="patron_id" name="patron_id"><option value="">—</option><?php $__currentLoopData = $staffMembers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $m): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($m->id); ?>" <?php if(old('patron_id', $club?->patron_id) == $m->id): echo 'selected'; endif; ?>><?php echo e($m->full_name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select>
    </div>
    <div class="form-group"><label class="form-label" for="academic_year_id">Academic Year</label>
        <select class="input" id="academic_year_id" name="academic_year_id"><option value="">—</option><?php $__currentLoopData = $academicYears; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $y): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($y->id); ?>" <?php if(old('academic_year_id', $club?->academic_year_id) == $y->id): echo 'selected'; endif; ?>><?php echo e($y->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select>
    </div>
    <div class="form-group"><label class="form-label" for="max_members">Max Members</label><input class="input" type="number" id="max_members" name="max_members" value="<?php echo e(old('max_members', $club?->max_members)); ?>"></div>
    <div class="form-group"><label class="form-label" for="status">Status</label>
        <select class="input" id="status" name="status"><?php $__currentLoopData = ['active','inactive']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($s); ?>" <?php if(old('status', $club?->status ?? 'active') === $s): echo 'selected'; endif; ?>><?php echo e(ucfirst($s)); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select>
    </div>
    <div class="form-group" style="display:flex;align-items:center;gap:8px;padding-top:28px;">
        <input type="checkbox" id="discussion_enabled" name="discussion_enabled" value="1" <?php if(old('discussion_enabled', $club?->discussion_enabled ?? true)): echo 'checked'; endif; ?>>
        <label for="discussion_enabled">Enable group discussions</label>
    </div>
    <div class="form-group" style="grid-column:1/-1;"><label class="form-label" for="description">Description</label><textarea class="input" id="description" name="description" rows="3"><?php echo e(old('description', $club?->description)); ?></textarea></div>
</div>
<?php /**PATH C:\laragon\www\southend\resources\views\admin\clubs\_form.blade.php ENDPATH**/ ?>