<div>

    <div class="row">
        <!-- __BLOCK__ --><?php if($demande): ?>
        <div class="col-2">
            <i class="icon-copy ion-android-arrow-back" wire:click="back" style="cursor:pointer; font-weight: bolder;"></i>
        </div>
        <!-- __BLOCK__ --><?php if(isset($demande->statut) && $demande->statut === "PENDING" && $demande->typo_d === "demande"): ?>
        <div class="col-10">
            <div class="flex text-center mb-15">
                <button type="button" wire:click="decision(<?php echo e($demande->id_demande); ?>,'YES')" class="btn btn-outline-success btn-sm"><i class="icon-copy fa fa-check" aria-hidden="true"></i> Autorisée</button>
                <button type="button" wire:click="decision(<?php echo e($demande->id_demande); ?>,'NON')" class="btn btn-outline-danger btn-sm"><i class="icon-copy fa fa-close" aria-hidden="true"></i> Refusée</button>
            </div>
        </div>
        <?php endif; ?> <!-- __ENDBLOCK__ -->
        <!-- __BLOCK__ --><?php if(isset($demande->statut) && $demande->statut === "PENDING" && $demande->typo_d === "rens"): ?>
        <div class="col-10">
            <div class="flex text-center mb-15">
                <button type="button" wire:click="decision(<?php echo e($demande->id_demande); ?>,'YES')" class="btn btn-outline-primary btn-sm"><i class="icon-copy fa fa-check" aria-hidden="true"></i> resolu</button>
            </div>
        </div>
        <?php endif; ?> <!-- __ENDBLOCK__ -->
        <?php endif; ?> <!-- __ENDBLOCK__ -->
    </div>
    <hr>

    <!-- __BLOCK__ --><?php if(!$demande): ?>
    <table class="table table-striped">
        <tbody>
            <!-- __BLOCK__ --><?php $__currentLoopData = $listDemande; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

            <tr wire:click="getDemande(<?php echo e($data->id_demande); ?>)">
                <th scope="row"><?php echo e($data->nom_entite); ?></th>
                <th scope="row"><?php echo e(\Illuminate\Support\Str::limit($data->titre, 80)); ?></th>
                <th scope="row"><?php echo e($data->date_sm); ?></th>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
        </tbody>
    </table>
    <?php endif; ?> <!-- __ENDBLOCK__ -->

    <!-- __BLOCK__ --><?php if($demande): ?>


    <div class="row mb-8">
        <div class="col-8">
            <h6 class=""><?php echo e($demande->nom_entite); ?></h6>
            <ul style="font-size: small;">
                <li> <?php echo e($demande->act_princ); ?></li>
                <li><i class="icon-copy fa fa-phone text-info" aria-hidden="true"></i> <?php echo e($demande->phone); ?></li>
                <li><i class="icon-copy fa fa-envelope-open text-info" aria-hidden="true"></i> <?php echo e($demande->email_society); ?></li>
                <li><i class="icon-copy fa fa-map-marker text-info" aria-hidden="true"></i> <?php echo e($demande->city_society); ?></li>
                <li>&nbsp;&nbsp; <?php echo e($demande->adress_society); ?></li>
            </ul>
        </div>
        <!-- __BLOCK__ --><?php if($demande->typo_d === "demande"): ?>
        <div class="col-4">
            <h6 class=""><?php echo e($demande->nom_site); ?></h6>
            <ul style="font-size: small;">
                <li><?php echo e($demande->date_d); ?> <?php echo e($demande->heure_d); ?></li>
                <li><?php echo e($demande->date_f); ?> <?php echo e($demande->heure_f); ?></li>
            </ul>
        </div>
        <?php endif; ?> <!-- __ENDBLOCK__ -->
    </div>

    <h5 class="mb-10 mt-5"><?php echo e($demande->titre); ?></h5>
    <p style="font-family: monospace;text-align: justify;"><?php echo nl2br(e($demande->contenue)); ?></p>

    <!-- __BLOCK__ --><?php if($demande->typo_d === "demande"): ?>
    <h6 class="mb-10 mt-3">Intervenants</h6>


    <table border="0" class="table-striped table-sm" style="font-size:0.8em; width:100%;">
        <thead>
            <tr style="font-weight: 600;">
                <td>#</td>
                <td>Noms</td>
                <td>Téléphone</td>
                <td>Email</td>

            </tr>
        </thead>
        <tbody>
            <?php
            $n = 0 ;
            ?>
            <!-- __BLOCK__ --><?php $__empty_1 = true; $__currentLoopData = $listIntervenants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>

            <?php
            $n++ ;
            ?>

            <tr>
                <td><?php echo e($n); ?></td>
                <td><?php echo e($data->full_name); ?></td>
                <td><?php echo e($data->telephone); ?></td>
                <td><?php echo e($data->address_mail); ?></td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>

            <?php endif; ?> <!-- __ENDBLOCK__ -->
        </tbody>
    </table>
    <?php endif; ?> <!-- __ENDBLOCK__ -->
    <h6 class="mb-10 mt-5">Fichiers</h6>

    <table border="0" class="table-striped table-sm" style="font-size:0.8em; width:100%;">
        <tbody>
            <?php
            $nn = 0 ;
            ?>
            <!-- __BLOCK__ --><?php $__empty_1 = true; $__currentLoopData = $listFiles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $file): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>

            <?php
            $nn++ ;
            ?>

            <tr>
                <td><?php echo e($nn); ?></td>
                <td>
                    <a href="<?php echo e(Storage::url($file->full_name_file)); ?>" download>Download Report</a>
                </td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <?php endif; ?> <!-- __ENDBLOCK__ -->
        </tbody>
    </table>



    <?php endif; ?> <!-- __ENDBLOCK__ -->


</div><?php /**PATH N:\AppLaravel\access\resources\views/livewire/admin/viewer-demande.blade.php ENDPATH**/ ?>