<?php
    /** @var \App\Models\FormField|null $field */
    $decoded = is_string($value) ? json_decode($value, true) : $value;
    $isTable = isset($field) && $field && $field->isTable() && is_array($decoded);
?>

<?php if($isTable): ?>
    <?php $cols = $field->tableColumns(); ?>
    <div class="overflow-x-auto">
        <table class="min-w-full border border-slate-200 text-xs">
            <thead class="bg-slate-50">
                <tr>
                    <?php $__currentLoopData = $cols; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $col): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <th class="border border-slate-200 px-2 py-1 text-left font-semibold text-slate-600 whitespace-nowrap"><?php echo e($col['label']); ?></th>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tr>
            </thead>
            <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $decoded; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <?php $__currentLoopData = $cols; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ci => $col): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php $cell = $row['col_'.$ci] ?? null; ?>
                            <td class="border border-slate-200 px-2 py-1 align-top">
                                <?php if(($col['type'] ?? null) === 'file' && filled($cell)): ?>
                                    <?php if (isset($component)) { $__componentOriginale428ff3664af329988e8d13451374b90 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale428ff3664af329988e8d13451374b90 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.file-preview','data' => ['path' => $cell,'compact' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('file-preview'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['path' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($cell),'compact' => true]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale428ff3664af329988e8d13451374b90)): ?>
<?php $attributes = $__attributesOriginale428ff3664af329988e8d13451374b90; ?>
<?php unset($__attributesOriginale428ff3664af329988e8d13451374b90); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale428ff3664af329988e8d13451374b90)): ?>
<?php $component = $__componentOriginale428ff3664af329988e8d13451374b90; ?>
<?php unset($__componentOriginale428ff3664af329988e8d13451374b90); ?>
<?php endif; ?>
                                <?php else: ?>
                                    <?php echo e(($cell === null || $cell === '') ? '—' : $cell); ?>

                                <?php endif; ?>
                            </td>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr><td colspan="<?php echo e(max(count($cols), 1)); ?>" class="border border-slate-200 px-2 py-1 text-slate-400">Aucune ligne</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
<?php else: ?>
    <?php
        $display = is_array($decoded)
            ? json_encode($decoded, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)
            : $value;
    ?>
    <span class="whitespace-pre-wrap"><?php echo e(($display === null || $display === '') ? '—' : $display); ?></span>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\teyssir\resources\views/partials/revision-value.blade.php ENDPATH**/ ?>