<?php $__env->startSection('title', 'Detail Pertanyaan - SKM Survey'); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid">
    <div class="row mb-4">
        <div class="col-12">
            <a href="<?php echo e(route('admin.questions.index')); ?>" class="btn btn-secondary mb-3">
                <i class="bi bi-arrow-left"></i> Kembali
            </a>
            <h2 style="color: #1e3a8a; font-weight: 700;">
                <i class="bi bi-eye me-2"></i> Detail Pertanyaan
            </h2>
        </div>
    </div>

    <div class="card card-gov shadow-sm mb-4">
        <div class="card-header">
            <h5 class="mb-0">Informasi Pertanyaan</h5>
        </div>
        <div class="card-body">
            <div class="row">
                <div class="col-md-3">
                    <strong>Kode:</strong>
                    <p><span class="badge-gov"><?php echo e($question->code); ?></span></p>
                </div>
                <div class="col-md-3">
                    <strong>Elemen:</strong>
                    <p><?php echo e($question->element); ?></p>
                </div>
                <div class="col-md-3">
                    <strong>Urutan:</strong>
                    <p><span class="badge bg-primary"><?php echo e($question->order); ?></span></p>
                </div>
                <div class="col-md-3">
                    <strong>Status:</strong>
                    <p>
                        <?php if($question->is_active): ?>
                            <span class="badge bg-success">Aktif</span>
                        <?php else: ?>
                            <span class="badge bg-secondary">Nonaktif</span>
                        <?php endif; ?>
                    </p>
                </div>
            </div>
            <div class="mt-3">
                <strong>Pertanyaan:</strong>
                <p class="mb-0"><?php echo e($question->question); ?></p>
            </div>
        </div>
    </div>

    <div class="card card-gov shadow-sm">
        <div class="card-header d-flex justify-content-between align-items-center">
            <h5 class="mb-0">Opsi Jawaban</h5>
            <a href="<?php echo e(route('admin.questions.edit', $question->id)); ?>" class="btn btn-sm btn-gov-primary">
                <i class="bi bi-pencil me-1"></i> Edit
            </a>
        </div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead class="table-light">
                        <tr>
                            <th>No</th>
                            <th>Label</th>
                            <th class="text-center">Score</th>
                            <th class="text-center">Weight</th>
                            <th class="text-center">Urutan</th>
                            <th class="text-center">Status</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $question->answerOptions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td><?php echo e($index + 1); ?></td>
                                <td><strong><?php echo e($option->label); ?></strong></td>
                                <td class="text-center"><span class="badge bg-info"><?php echo e($option->score); ?></span></td>
                                <td class="text-center"><span class="badge bg-secondary"><?php echo e(number_format($option->weight, 2)); ?></span></td>
                                <td class="text-center"><span class="badge bg-primary"><?php echo e($option->order); ?></span></td>
                                <td class="text-center">
                                    <?php if($option->is_active): ?>
                                        <span class="badge bg-success">Aktif</span>
                                    <?php else: ?>
                                        <span class="badge bg-secondary">Nonaktif</span>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="6" class="text-center">Belum ada opsi jawaban</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/user/Documents/giriwidyan/project/inhouse/skm/resources/views/admin/questions/show.blade.php ENDPATH**/ ?>