

<?php $__env->startSection('content'); ?>
<section class="section light">
    <div class="container">
        <div class="post-header" style="margin-bottom: 40px;">
            <h1 style="font-size: 3rem;">Upload to Gallery</h1>
            <p>Share photos and videos of our community impact with the world.</p>
        </div>

        <div class="form-container">
            <?php if($errors->any()): ?>
                <div class="alert-error">
                    <ul style="margin-left: 20px;">
                        <?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('gallery.upload.store')); ?>" method="POST" enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <div class="form-group">
                    <label>Event / Group</label>
                    <select name="group_id" class="form-control" style="width: 100%; padding: 16px 20px; border: 2px solid #eee; border-radius: 10px; font-size: 1.1rem; background: #fcfcfc;">
                        <option value="">-- Select Existing Group (Optional) --</option>
                        <?php $__currentLoopData = $groups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($group->id); ?>"><?php echo e($group->name); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>

                <div class="form-group">
                    <label>Or Create New Group</label>
                    <input type="text" name="new_group" placeholder="e.g., Annual Gala 2026">
                </div>

                <div class="form-group">
                    <label>Gallery Title</label>
                    <input type="text" name="title" value="<?php echo e(old('title')); ?>" placeholder="e.g., Community Food Drive 2026" required autofocus>
                </div>

                <div class="form-group">
                    <label>Description (Optional)</label>
                    <textarea name="description" rows="3" placeholder="Tell us more about these photos/videos..."><?php echo e(old('description')); ?></textarea>
                </div>

                <div class="form-group">
                    <label>Select Photos or Videos</label>
                    <input type="file" name="media[]" accept="image/*,video/*" required multiple>
                    <p style="font-size: 0.8rem; color: #888; margin-top: 10px;">You can select multiple files at once. (Max 20MB per file)</p>
                </div>

                <div style="text-align: right; margin-top: 40px;">
                    <a href="<?php echo e(route('gallery')); ?>" style="margin-right: 20px; color: #666; text-decoration: none; font-weight: 600;">Cancel</a>
                    <button type="submit" class="button button-primary" style="margin: 0; padding: 16px 50px;">Start Upload</button>
                </div>
            </form>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\Touchfoundation\resources\views/pages/gallery-upload.blade.php ENDPATH**/ ?>