

<?php $__env->startSection('title','Edit Tiket'); ?>

<?php $__env->startSection('content'); ?>

<div class="container" style="max-width:960px;">
    <div class="card-dark p-4">
        <div class="d-flex flex-column flex-md-row align-items-start align-items-md-center justify-content-between gap-3 mb-3">
            <div>
                <h3 class="mb-1">Edit Tiket</h3>
                <p class="text-muted-sm">Perbarui informasi tiket.</p>
            </div>
            <a href="<?php echo e(route('tiket.index')); ?>" class="btn btn-outline-soft">Kembali ke daftar</a>
        </div>

        <?php if($errors->any()): ?>
            <div class="alert alert-danger mb-3"><ul class="mb-0"><?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><li><?php echo e($error); ?></li><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></ul></div>
        <?php endif; ?>

        <form action="<?php echo e(route('tiket.update', $tiket->id)); ?>" method="POST">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>

            <div class="row g-4">
                <div class="col-md-6">
                    <label class="form-label">Event</label>
                    <select name="event_id" class="form-control-dark form-control" required>
                        <?php $__currentLoopData = $events; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $event): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($event->id); ?>" <?php echo e(old('event_id', $tiket->event_id) == $event->id ? 'selected' : ''); ?>><?php echo e($event->nama_event); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>

                <div class="col-md-6">
                    <label class="form-label">Jenis Tiket</label>
                    <input type="text" name="jenis" class="form-control-dark form-control" value="<?php echo e(old('jenis', $tiket->jenis)); ?>" placeholder="Contoh: VIP" required>
                </div>

                <div class="col-md-6">
                    <label class="form-label">Harga (Rp)</label>
                    <input type="number" name="harga" class="form-control-dark form-control" value="<?php echo e(old('harga', $tiket->harga)); ?>" required>
                </div>

                <div class="col-md-6">
                    <label class="form-label">Stok</label>
                    <input type="number" name="stok" class="form-control-dark form-control" value="<?php echo e(old('stok', $tiket->stok)); ?>" required>
                </div>
            </div>

            <div class="mt-4 d-flex flex-wrap gap-2">
                <button class="btn-primary-glow">Perbarui Tiket</button>
                <a href="<?php echo e(route('tiket.index')); ?>" class="btn btn-outline-soft">Batal</a>
            </div>
        </form>
    </div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\tugas pa asur\konser-ticket\resources\views/tiket/edit.blade.php ENDPATH**/ ?>