

<?php $__env->startSection('title', 'Mi Dashboard'); ?>

<?php $__env->startSection('content'); ?>
<h1 class="mb-4">Mis eventos</h1>
<p class="text-muted">Bienvenido, <?php echo e($user->name); ?> 👋</p>

<?php if(session('ok')): ?>
  <div class="alert alert-success"><?php echo e(session('ok')); ?></div>
<?php endif; ?>

<?php if($lastEvent): ?>
  <div class="alert alert-info">
    Último evento: <strong><?php echo e($lastEvent->titulo); ?></strong>
  </div>

  <div class="d-flex flex-wrap gap-2 mb-4">
    <a href="<?php echo e(route('events.edit', $lastEvent)); ?>" class="btn btn-accent btn-lg">
      Subir imágenes al último evento
    </a>
    <a href="<?php echo e(route('events.create')); ?>" class="btn btn-outline-light btn-lg">
      Crear nuevo evento
    </a>
  </div>
<?php else: ?>
  <div class="alert alert-warning">
    Aún no tienes eventos creados.
  </div>
  <a href="<?php echo e(route('events.create')); ?>" class="btn btn-accent btn-lg">Crear mi primer evento</a>
<?php endif; ?>

<?php if($events->count() > 0): ?>
  <h2 class="h5 mt-5 mb-3">Listado de mis eventos</h2>
  <div class="row g-3">
    <?php $__currentLoopData = $events; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $event): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      <div class="col-6 col-md-4 col-lg-3">
        <div class="card card-surface rounded-4 overflow-hidden h-100">
          <div class="card-body">
            <h5 class="card-title text-truncate"><?php echo e($event->titulo); ?></h5>
            <p class="small text-muted mb-3">Slug: <?php echo e($event->slug); ?></p>
            <div class="d-flex gap-2">
              <a href="<?php echo e(route('events.edit', $event)); ?>" class="btn btn-sm btn-accent flex-fill">Editar</a>
              <a href="<?php echo e(route('preview.form', $event->slug)); ?>" class="btn btn-sm btn-outline-light flex-fill">Preview</a>
            </div>
          </div>
        </div>
      </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  </div>
<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\jaran\Documents\Marketing Digital\Laravel\eventos\resources\views/dashboard/guest.blade.php ENDPATH**/ ?>