

<?php $__env->startSection('content'); ?>
<div class="mb-8">
    <a href="<?php echo e(route('partner.events.index')); ?>" class="text-emerald-600 font-bold hover:underline flex items-center gap-1 mb-4">
        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path>
        </svg>
        Kembali
    </a>
    <h1 class="text-3xl font-black">Edit Event</h1>
    <p class="text-slate-500 font-medium"><?php echo e($event->title); ?></p>
</div>

<div class="bg-white rounded-3xl border border-slate-100 shadow-sm p-8 max-w-3xl">
    <form method="POST" action="<?php echo e(route('partner.events.update', $event->id)); ?>" enctype="multipart/form-data">
        <?php echo csrf_field(); ?>
        <?php echo method_field('PUT'); ?>

        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
            <div class="md:col-span-2">
                <label class="block text-sm font-bold text-slate-700 mb-2">Judul Event</label>
                <input type="text" name="title" value="<?php echo e(old('title', $event->title)); ?>" required
                    class="w-full px-5 py-3 rounded-xl border border-slate-200 outline-none">
            </div>

            <div>
                <label class="block text-sm font-bold text-slate-700 mb-2">Kategori</label>
                <select name="category_id" class="w-full px-5 py-3 rounded-xl border border-slate-200 outline-none" required>
                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($category->id); ?>" <?php echo e($event->category_id == $category->id ? 'selected' : ''); ?>>
                            <?php echo e($category->name); ?>

                        </option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>

            <div>
                <label class="block text-sm font-bold text-slate-700 mb-2">Tanggal & Waktu</label>
                <input type="datetime-local" name="date" value="<?php echo e(old('date', date('Y-m-d\TH:i', strtotime($event->date)))); ?>" required
                    class="w-full px-5 py-3 rounded-xl border border-slate-200 outline-none">
            </div>

            <div>
                <label class="block text-sm font-bold text-slate-700 mb-2">Lokasi</label>
                <input type="text" name="location" value="<?php echo e(old('location', $event->location)); ?>" required
                    class="w-full px-5 py-3 rounded-xl border border-slate-200 outline-none">
            </div>

            <div>
                <label class="block text-sm font-bold text-slate-700 mb-2">Harga Tiket (Rp)</label>
                <input type="number" name="price" value="<?php echo e(old('price', $event->price)); ?>" min="0" required
                    class="w-full px-5 py-3 rounded-xl border border-slate-200 outline-none">
            </div>

            <div>
                <label class="block text-sm font-bold text-slate-700 mb-2">Stok Tiket</label>
                <input type="number" name="stock" value="<?php echo e(old('stock', $event->stock)); ?>" min="0" required
                    class="w-full px-5 py-3 rounded-xl border border-slate-200 outline-none">
            </div>

            <div class="md:col-span-2">
                <label class="block text-sm font-bold text-slate-700 mb-2">Poster / Gambar</label>
                <?php if($event->poster_path): ?>
                    <p class="text-xs text-slate-400 mb-2">Poster saat ini: <?php echo e($event->poster_path); ?></p>
                <?php endif; ?>
                <input type="file" name="poster" accept="image/*"
                    class="w-full px-5 py-3 rounded-xl border border-slate-200 outline-none">
            </div>

            <div class="md:col-span-2">
                <label class="block text-sm font-bold text-slate-700 mb-2">Deskripsi</label>
                <textarea name="description" rows="5" required
                    class="w-full px-5 py-3 rounded-xl border border-slate-200 outline-none"><?php echo e(old('description', $event->description)); ?></textarea>
            </div>
        </div>

        <div class="mt-8 flex justify-end">
            <button type="submit"
                class="px-8 py-3.5 bg-emerald-600 text-white rounded-xl font-bold hover:bg-emerald-700 transition shadow-lg">
                Update Event
            </button>
        </div>
    </form>
</div>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('partner.layouts.partner', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\Eventamikom-3182\resources\views/partner/events/edit.blade.php ENDPATH**/ ?>