<?php $__env->startSection('title', __('Editar evento')); ?>

<?php $__env->startSection('content'); ?>
    <?php
        $featuredExistingUrl = $event->featured_image_path
            ? asset($event->featured_image_path)
            : '';
    ?>
    <div class="rt-events-hub mb-3">
        <div class="d-sm-flex align-items-start justify-content-between rt-flex-gap-3 mb-2">
            <div>
                <nav aria-label="breadcrumb" class="mb-1">
                    <ol class="breadcrumb bg-transparent p-0 mb-0" style="font-size:.82rem">
                        <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard.events.index')); ?>"><?php echo e(__('Eventos')); ?></a></li>
                        <li class="breadcrumb-item active" aria-current="page"><?php echo e(__('Editar')); ?></li>
                    </ol>
                </nav>
                <h1 class="h3 mb-0 text-gray-800 font-weight-bold"><?php echo e($event->title); ?></h1>
                <p class="small text-muted mb-0">
                    <i class="bi bi-person-circle mr-1" aria-hidden="true"></i>
                    <?php echo e(__('Autor:')); ?> <strong><?php echo e($event->organizer?->user?->name ?? auth()->user()->name); ?></strong>
                    <span class="mx-1">·</span>
                    <?php echo e(__('Creado')); ?> <?php echo e($event->created_at->format('d/m/Y')); ?>

                    <?php if($event->updated_at && $event->updated_at->ne($event->created_at)): ?>
                        <span class="mx-1">·</span>
                        <?php echo e(__('Modificado')); ?> <?php echo e($event->updated_at->diffForHumans()); ?>

                    <?php endif; ?>
                </p>
            </div>
            <div class="d-flex rt-flex-gap-2 flex-shrink-0">
                <?php if($event->status === \App\Enums\EventStatus::Published): ?>
                    <a href="<?php echo e(route('landing.event.show', $event->slug)); ?>" target="_blank" class="btn btn-sm btn-outline-success">
                        <i class="bi bi-box-arrow-up-right mr-1" aria-hidden="true"></i><?php echo e(__('Ver público')); ?>

                    </a>
                <?php endif; ?>
                <a href="<?php echo e(route('dashboard.events.index')); ?>" class="btn btn-sm btn-outline-secondary">
                    <i class="bi bi-arrow-left mr-1" aria-hidden="true"></i><?php echo e(__('Volver')); ?>

                </a>
            </div>
        </div>
        <div class="rt-pride-ribbon small">
            <span class="rt-pride-ribbon__flag" aria-hidden="true"></span>
            <span><?php echo e(__('Mantén distancias, BIB y entradas alineadas con tu operación en pista.')); ?></span>
        </div>
    </div>

    <form
        id="rt-event-form"
        class="rt-event-form-theme"
        method="post"
        action="<?php echo e(route('dashboard.events.update', $event)); ?>"
        data-featured-upload-url="<?php echo e(route('dashboard.uploads.event-featured')); ?>"
        data-venue-store-url="<?php echo e(route('dashboard.catalog.venues.store')); ?>"
        data-category-store-url="<?php echo e(route('dashboard.catalog.categories.store')); ?>"
        data-google-maps-key="<?php echo e(config('services.google_maps.browser_key')); ?>"
        data-featured-existing-url="<?php echo e($featuredExistingUrl); ?>"
    >
        <?php echo csrf_field(); ?>
        <?php echo method_field('PUT'); ?>
        <?php echo $__env->make('dashboard.events._form', [
            'venues' => $venues,
            'categories' => $categories,
            'timezones' => $timezones,
            'ticketsForm' => $ticketsForm,
            'defaultTicketTemplate' => $defaultTicketTemplate,
            'event' => $event,
        ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
    </form>
<?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/events/edit.blade.php ENDPATH**/ ?>