<?php $__env->startSection('title', 'Nouvelle demande - '.$typeLabel); ?>
<?php $__env->startSection('content'); ?>
<a href="<?php echo e(route('partner.requests.index', $type)); ?>" class="mb-3 d-inline-block">&laquo; Retour</a>
<h3 class="mb-4"><?php echo e($typeLabel); ?></h3>

<div class="card p-4" style="max-width:700px;">
    <form method="POST" action="<?php echo e(route('partner.requests.store', $type)); ?>" enctype="multipart/form-data">
        <?php echo csrf_field(); ?>

        <?php if($type === 'prelevement'): ?>
            <div class="mb-3">
                <label class="form-label">Nombre estime d'echantillons</label>
                <input type="number" name="estimated_quantity" class="form-control" min="1" required>
            </div>
            <div class="mb-3">
                <label class="form-label">Creneau souhaite</label>
                <input type="text" name="requested_slot" class="form-control" placeholder="Ex: aujourd'hui 14h-16h" required>
            </div>
            <div class="mb-3">
                <label class="form-label">Notes (optionnel)</label>
                <textarea name="notes" class="form-control" rows="3"></textarea>
            </div>

        <?php elseif($type === 'consommable'): ?>
            <div class="mb-3">
                <label class="form-label">Consommable souhaite</label>
                <input type="text" name="consumable_name" class="form-control" placeholder="Ex: tubes EDTA, sachets, etiquettes..." required>
            </div>
            <div class="mb-3">
                <label class="form-label">Quantite</label>
                <input type="number" name="estimated_quantity" class="form-control" min="1" required>
            </div>
            <div class="mb-3">
                <label class="form-label">Notes (optionnel)</label>
                <textarea name="notes" class="form-control" rows="3"></textarea>
            </div>

        <?php elseif($type === 'reclamation'): ?>
            <div class="mb-3">
                <label class="form-label">Categorie</label>
                <select name="category" class="form-select" required>
                    <option value="retard">Retard</option>
                    <option value="perte">Perte</option>
                    <option value="casse">Casse</option>
                    <option value="erreur_etiquetage">Erreur d'etiquetage</option>
                    <option value="autre">Autre</option>
                </select>
            </div>
            <div class="mb-3">
                <label class="form-label">Description</label>
                <textarea name="description" class="form-control" rows="4" required></textarea>
            </div>

        <?php elseif($type === 'resultat'): ?>
            <div class="mb-3">
                <label class="form-label">Reference patient / dossier</label>
                <input type="text" name="patient_reference" class="form-control" required>
            </div>
            <div class="mb-3">
                <label class="form-label">Notes (optionnel)</label>
                <textarea name="notes" class="form-control" rows="3"></textarea>
            </div>
        <?php endif; ?>

        <div class="mb-3">
            <label class="form-label">Urgence</label>
            <select name="urgency" class="form-select" required>
                <option value="normal">Normal</option>
                <option value="urgent">Urgent</option>
            </select>
        </div>

        <button class="btn btn-primary">Envoyer la demande</button>
    </form>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/smartch/capara/resources/views/partner/requests/create.blade.php ENDPATH**/ ?>