<?php $__env->startSection('title', __('Catálogo — revisión')); ?>

<?php $__env->startSection('content'); ?>
    <div class="d-flex flex-wrap align-items-center justify-content-between mb-4">
        <div>
            <h1 class="h3 mb-1 text-gray-800 font-weight-bold"><?php echo e(__('Sedes y categorías pendientes')); ?></h1>
            <p class="text-muted small mb-0">
                <?php echo e(__('Los organizadores pueden crear sedes y categorías nuevas; quedan aquí hasta que las apruebes.')); ?>

            </p>
        </div>
        <a href="<?php echo e(route('dashboard.events.index')); ?>" class="btn btn-sm btn-outline-secondary"><?php echo e(__('Volver a eventos')); ?></a>
    </div>

    <div class="card shadow-sm border-0 mb-4">
        <div class="card-header bg-white py-3">
            <h6 class="m-0 font-weight-bold text-primary"><?php echo e(__('Sedes / recintos en revisión')); ?></h6>
        </div>
        <div class="card-body p-0">
            <?php if($pendingVenues->isEmpty()): ?>
                <p class="text-muted small mb-0 p-3"><?php echo e(__('No hay sedes pendientes.')); ?></p>
            <?php else: ?>
                <div class="table-responsive">
                    <table class="table table-hover mb-0 align-middle">
                        <thead class="thead-light">
                            <tr>
                                <th><?php echo e(__('Nombre')); ?></th>
                                <th><?php echo e(__('Ubicación')); ?></th>
                                <th><?php echo e(__('Solicitó')); ?></th>
                                <th><?php echo e(__('Alta')); ?></th>
                                <th class="text-right"><?php echo e(__('Acción')); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $pendingVenues; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $v): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td class="font-weight-bold text-dark"><?php echo e($v->name); ?></td>
                                    <td class="small text-muted"><?php echo e($v->city ?: ($v->address_line_1 ?: '—')); ?></td>
                                    <td class="small"><?php echo e($v->submittedBy?->email ?? '—'); ?></td>
                                    <td class="small text-muted"><?php echo e($v->created_at?->diffForHumans()); ?></td>
                                    <td class="text-right">
                                        <form action="<?php echo e(route('dashboard.catalog.venues.approve', $v)); ?>" method="post" class="d-inline">
                                            <?php echo csrf_field(); ?>
                                            <button type="submit" class="btn btn-sm btn-success"><?php echo e(__('Aprobar')); ?></button>
                                        </form>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>
            <?php endif; ?>
        </div>
    </div>

    <div class="card shadow-sm border-0 mb-4">
        <div class="card-header bg-white py-3">
            <h6 class="m-0 font-weight-bold text-primary"><?php echo e(__('Categorías en revisión')); ?></h6>
        </div>
        <div class="card-body p-0">
            <?php if($pendingCategories->isEmpty()): ?>
                <p class="text-muted small mb-0 p-3"><?php echo e(__('No hay categorías pendientes.')); ?></p>
            <?php else: ?>
                <div class="table-responsive">
                    <table class="table table-hover mb-0 align-middle">
                        <thead class="thead-light">
                            <tr>
                                <th><?php echo e(__('Nombre')); ?></th>
                                <th><?php echo e(__('Solicitó')); ?></th>
                                <th><?php echo e(__('Alta')); ?></th>
                                <th class="text-right"><?php echo e(__('Acción')); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $pendingCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td class="font-weight-bold text-dark"><?php echo e($c->name); ?></td>
                                    <td class="small"><?php echo e($c->submittedBy?->email ?? '—'); ?></td>
                                    <td class="small text-muted"><?php echo e($c->created_at?->diffForHumans()); ?></td>
                                    <td class="text-right">
                                        <form action="<?php echo e(route('dashboard.catalog.categories.approve', $c)); ?>" method="post" class="d-inline">
                                            <?php echo csrf_field(); ?>
                                            <button type="submit" class="btn btn-sm btn-success"><?php echo e(__('Aprobar')); ?></button>
                                        </form>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>
            <?php endif; ?>
        </div>
    </div>

    <div class="alert alert-light border small mb-0">
        <strong><?php echo e(__('Eventos')); ?>:</strong>
        <?php echo e(__('Los organizadores ya no pueden publicar solos: el evento queda «En revisión» hasta que un administrador cambie el estado en la edición del evento.')); ?>

    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.dashboard', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/resources/views/dashboard/catalog/pending-review.blade.php ENDPATH**/ ?>