<?php $__env->startSection('content'); ?>
    <section class="hero-card narrow-card">
        <div class="brand-lockup">
            <img class="brand-logo" src="<?php echo e(asset('images/neutro-pharma-logo.svg')); ?>" alt="Neutro Pharma logo">
            <div>
                <strong>Neutro Pharma (Pvt) Ltd.</strong>
                <small>Periume Advance Quiz</small>
            </div>
        </div>
        <p class="eyebrow">Participant Entry</p>
        <h1><?php echo e($quiz?->title ?? 'No Active Test'); ?></h1>
        <p class="muted">
            <?php if($quiz): ?>
                Enter your name to join the live <?php echo e(strtolower($quiz->test_type ?? 'test')); ?>. Your session ID will be generated automatically.
            <?php else: ?>
                No test is currently active. Please ask the admin to activate a test.
            <?php endif; ?>
        </p>

        <?php if($errors->any()): ?>
            <div class="alert error">
                <?php echo e($errors->first()); ?>

            </div>
        <?php endif; ?>

        <?php if(($activeQuizzes ?? collect())->count() > 1): ?>
            <div class="test-choice-list">
                <?php $__currentLoopData = $activeQuizzes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $activeQuiz): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <a class="test-choice <?php if($quiz && $quiz->id === $activeQuiz->id): ?> is-selected <?php endif; ?>" href="<?php echo e(route('quiz.join', ['quizSlug' => $activeQuiz->slug])); ?>">
                        <span><?php echo e($activeQuiz->test_type); ?></span>
                        <strong><?php echo e($activeQuiz->title); ?></strong>
                        <small><?php echo e($activeQuiz->questions_count); ?> questions</small>
                    </a>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        <?php endif; ?>

        <?php if($quiz): ?>
            <form method="POST" action="<?php echo e(route('quiz.participant.store')); ?>" class="stack-form">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="quiz_id" value="<?php echo e($quiz->id); ?>">
                <label for="name">Participant name</label>
                <input id="name" name="name" value="<?php echo e(old('name')); ?>" required maxlength="80" placeholder="Enter your full name">
                <button class="primary-button" type="submit">Join Test</button>
            </form>
        <?php endif; ?>

        <div class="footer-note">
            Admin dashboard: <a href="<?php echo e(route('admin.quiz')); ?>">Open admin</a>
        </div>
    </section>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('vite'); ?>
    <?php echo app('Illuminate\Foundation\Vite')(['resources/css/app.css']); ?>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH G:\xampp\htdocs\quizapp\resources\views/join.blade.php ENDPATH**/ ?>