
<div>
    <label class="block text-sm font-semibold text-gray-700 mb-1">Home Team <span class="text-red-500">*</span></label>
    <select name="home_team_id" required
            class="w-full rounded-xl border border-gray-300 px-4 py-3 text-sm focus:ring-2 focus:ring-wc-green focus:border-transparent">
        <option value="">— Select team —</option>
        <?php $__currentLoopData = $teams->groupBy('group_name'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group => $groupTeams): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <optgroup label="Group <?php echo e($group); ?>">
                <?php $__currentLoopData = $groupTeams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $team): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($team->id); ?>"
                        <?php echo e(old('home_team_id', $match->home_team_id ?? '') == $team->id ? 'selected' : ''); ?>>
                        <?php echo e($team->name); ?> (<?php echo e($team->code); ?>)
                    </option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </optgroup>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </select>
    <?php $__errorArgs = ['home_team_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="mt-1 text-xs text-red-600"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>


<div>
    <label class="block text-sm font-semibold text-gray-700 mb-1">Away Team <span class="text-red-500">*</span></label>
    <select name="away_team_id" required
            class="w-full rounded-xl border border-gray-300 px-4 py-3 text-sm focus:ring-2 focus:ring-wc-green focus:border-transparent">
        <option value="">— Select team —</option>
        <?php $__currentLoopData = $teams->groupBy('group_name'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group => $groupTeams): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <optgroup label="Group <?php echo e($group); ?>">
                <?php $__currentLoopData = $groupTeams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $team): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($team->id); ?>"
                        <?php echo e(old('away_team_id', $match->away_team_id ?? '') == $team->id ? 'selected' : ''); ?>>
                        <?php echo e($team->name); ?> (<?php echo e($team->code); ?>)
                    </option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </optgroup>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </select>
    <?php $__errorArgs = ['away_team_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="mt-1 text-xs text-red-600"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>


<div>
    <label class="block text-sm font-semibold text-gray-700 mb-1">
        Match Date & Time <span class="text-red-500">*</span>
        <span class="text-xs font-normal text-gray-400">
            (<?php echo e(str_replace('_', ' ', config('app.admin_timezone'))); ?> — GMT<?php echo e(now(config('app.admin_timezone'))->format('P')); ?>)
        </span>
    </label>
    <input type="datetime-local" name="match_datetime" required
           value="<?php echo e(old('match_datetime', $matchDatetimeLocal ?? '')); ?>"
           class="w-full rounded-xl border border-gray-300 px-4 py-3 text-sm focus:ring-2 focus:ring-wc-green focus:border-transparent">
    <p class="mt-1 text-xs text-gray-400">
        Each fan sees this automatically converted to their own local time in the app.
    </p>
    <?php $__errorArgs = ['match_datetime'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="mt-1 text-xs text-red-600"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>


<div>
    <label class="block text-sm font-semibold text-gray-700 mb-1">Venue</label>
    <input type="text" name="venue" placeholder="e.g. Lusail Stadium, Qatar"
           value="<?php echo e(old('venue', $match->venue ?? '')); ?>"
           class="w-full rounded-xl border border-gray-300 px-4 py-3 text-sm focus:ring-2 focus:ring-wc-green focus:border-transparent">
</div>


<div>
    <label class="block text-sm font-semibold text-gray-700 mb-1">Stage <span class="text-red-500">*</span></label>
    <select name="stage" required
            class="w-full rounded-xl border border-gray-300 px-4 py-3 text-sm focus:ring-2 focus:ring-wc-green focus:border-transparent">
        <?php $__currentLoopData = ['group'=>'Group Stage','round_of_16'=>'Round of 16','quarterfinal'=>'Quarterfinal','semifinal'=>'Semifinal','final'=>'Final']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $val => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <option value="<?php echo e($val); ?>"
                <?php echo e(old('stage', $match->stage ?? 'group') === $val ? 'selected' : ''); ?>>
                <?php echo e($label); ?>

            </option>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </select>
    <?php $__errorArgs = ['stage'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="mt-1 text-xs text-red-600"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>


<div>
    <label class="block text-sm font-semibold text-gray-700 mb-1">Group (A–H)</label>
    <input type="text" name="group_name" maxlength="1" placeholder="e.g. A"
           value="<?php echo e(old('group_name', $match->group_name ?? '')); ?>"
           class="w-full rounded-xl border border-gray-300 px-4 py-3 text-sm uppercase focus:ring-2 focus:ring-wc-green focus:border-transparent">
    <p class="mt-1 text-xs text-gray-400">Groups A–L. Leave blank for knockout stages</p>
</div>
<?php /**PATH C:\xampp\htdocs\MatchDay\resources\views/admin/matches/_form.blade.php ENDPATH**/ ?>