<form method="POST" action="<?php echo e($action); ?>">
    <?php echo csrf_field(); ?>
    <?php if($method === 'PUT'): ?> <?php echo method_field('PUT'); ?> <?php endif; ?>

    <div class="form-row">
        <div class="form-group">
            <label class="form-label">Kategori <span class="required">*</span></label>
            <select name="interview_category_id" required class="form-control form-select">
                <option value="">-- Kategori Seçin --</option>
                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($cat->id); ?>" <?php echo e((isset($simulationQuestion) && $simulationQuestion->interview_category_id == $cat->id) || (isset($selectedCategoryId) && $selectedCategoryId == $cat->id) ? 'selected' : ''); ?>>
                        <?php echo e($cat->name); ?>

                    </option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
            <?php $__errorArgs = ['interview_category_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <div class="form-hint" style="color:#ef4444;"><?php echo e($message); ?></div> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <div class="form-group">
            <label class="form-label">Sıra <span class="required">*</span></label>
            <input type="number" name="order" required min="0" class="form-control"
                   value="<?php echo e(isset($simulationQuestion) ? $simulationQuestion->order : '1'); ?>">
            <div class="form-hint">Sorular bu sıraya göre gösterilir (1, 2, 3...)</div>
            <?php $__errorArgs = ['order'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <div class="form-hint" style="color:#ef4444;"><?php echo e($message); ?></div> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>
    </div>

    <div class="form-group">
        <label class="form-label">Soru Metni <span class="required">*</span></label>
        <textarea name="question" required class="form-control" rows="3"><?php echo e(isset($simulationQuestion) ? $simulationQuestion->question : ''); ?></textarea>
        <?php $__errorArgs = ['question'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <div class="form-hint" style="color:#ef4444;"><?php echo e($message); ?></div> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
    </div>

    <div class="form-group">
        <label class="form-label">Beklenen Anahtar Kelimeler</label>
        <input type="text" name="expected_keywords" class="form-control"
               placeholder="örn: vatan, liderlik, disiplin, sorumluluk, fedakarlık"
               value="<?php echo e(isset($keywordsText) ? $keywordsText : ''); ?>">
        <div class="form-hint">Virgülle ayırın. Cevap değerlendirme bu kelimelerin eşleşmesine göre yapılır.</div>
        <?php $__errorArgs = ['expected_keywords'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <div class="form-hint" style="color:#ef4444;"><?php echo e($message); ?></div> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
    </div>

    <div class="form-group">
        <label class="form-label">Örnek Cevap</label>
        <textarea name="sample_answer" class="form-control" rows="4"
                  placeholder="Bu soruya verilmesi beklenen ideal cevabı yazın..."><?php echo e(isset($simulationQuestion) ? $simulationQuestion->sample_answer : ''); ?></textarea>
        <div class="form-hint">Kullanıcıya simülasyon sonucunda gösterilecek örnek cevap.</div>
        <?php $__errorArgs = ['sample_answer'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <div class="form-hint" style="color:#ef4444;"><?php echo e($message); ?></div> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
    </div>

    <div class="form-group">
        <label class="form-label">Puan <span class="required">*</span></label>
        <input type="number" name="points" required min="1" max="100" class="form-control" style="max-width:120px;"
               value="<?php echo e(isset($simulationQuestion) ? $simulationQuestion->points : '20'); ?>">
        <div class="form-hint">Bu sorudan alınabilecek maksimum puan (1–100)</div>
        <?php $__errorArgs = ['points'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <div class="form-hint" style="color:#ef4444;"><?php echo e($message); ?></div> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
    </div>

    <div class="divider"></div>

    <div style="display: flex; gap: 10px;">
        <button type="submit" class="btn btn-primary">
            <svg fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>
            Kaydet
        </button>
        <a href="<?php echo e(route('admin.simulation-questions.index')); ?>" class="btn btn-secondary">İptal</a>
    </div>
</form>
<?php /**PATH C:\xampp\htdocs\askeribilgiler\resources\views\admin\simulation-questions\_form.blade.php ENDPATH**/ ?>