<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <div class="py-12 bg-gray-50 min-h-screen">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
            
            <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between bg-white p-6 rounded-2xl border border-gray-100 shadow-sm gap-4">
                <div>
                    <h2 class="text-2xl font-black text-gray-800 tracking-tight">Tambah Lokasi Baru</h2>
                    <p class="text-sm text-gray-400 font-medium mt-0.5">Daftarkan titik koordinat produksi atau operasional logistik baru untuk cakupan wilayah Tempe Zhi.</p>
                </div>
                <div>
                    <a href="<?php echo e(route('admin.lokasi.index')); ?>"   class="inline-flex items-center gap-2 bg-white hover:bg-gray-50 text-gray-600 px-5 py-2.5 rounded-xl font-bold text-xs border border-gray-200 shadow-sm transition-all active:scale-95 whitespace-nowrap">
                        Kembali ke List
                    </a>
                </div>
            </div>

            <div class="bg-white shadow-sm rounded-2xl border border-gray-100 p-6 md:p-8">
                
                <?php if($errors->any()): ?>
                    <div class="mb-6 p-4 bg-red-50 border-l-4 border-red-500 text-red-700 rounded-r-xl">
                        <ul class="list-disc list-inside text-sm font-medium">
                            <?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('admin.lokasi.store')); ?>" method="POST" class="space-y-6">
                    <?php echo csrf_field(); ?>
                    
                    <div class="space-y-2">
                        <label for="nama_lokasi" class="text-xs font-bold text-gray-400 uppercase tracking-wider block">Nama Lokasi</label>
                        <input type="text" 
                               name="nama_lokasi" 
                               id="nama_lokasi"
                               value="<?php echo e(old('nama_lokasi')); ?>"
                               class="w-full px-4 py-3 rounded-xl border border-gray-200 text-sm font-bold text-gray-800 focus:ring-2 focus:ring-green-700/20 focus:border-green-700 transition-all" 
                               placeholder="Contoh: Rumah Produksi Utama Banjarbaru"
                               required>
                    </div>
                    
                    <div class="space-y-2">
                        <label for="alamat" class="text-xs font-bold text-gray-400 uppercase tracking-wider block">Alamat Lengkap</label>
                        <textarea name="alamat" 
                                  id="alamat"
                                  rows="3" 
                                  class="w-full px-4 py-3 rounded-xl border border-gray-200 text-sm font-bold text-gray-800 focus:ring-2 focus:ring-green-700/20 focus:border-green-700 transition-all" 
                                  placeholder="Tuliskan nama jalan, RT/RW, kelurahan, dan detail patokan operasional..."
                                  required><?php echo e(old('alamat')); ?></textarea>
                    </div>

                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <div class="space-y-2">
                            <label for="latitude" class="text-xs font-bold text-gray-400 uppercase tracking-wider block">Latitude Koordinat</label>
                            <input type="text" 
                                   name="latitude" 
                                   id="latitude"
                                   value="<?php echo e(old('latitude')); ?>"
                                   class="w-full px-4 py-3 rounded-xl border border-gray-200 text-sm font-bold text-gray-800 focus:ring-2 focus:ring-green-700/20 focus:border-green-700 transition-all" 
                                   placeholder="-3.441234">
                        </div>

                        <div class="space-y-2">
                            <label for="longitude" class="text-xs font-bold text-gray-400 uppercase tracking-wider block">Longitude Koordinat</label>
                            <input type="text" 
                                   name="longitude" 
                                   id="longitude"
                                   value="<?php echo e(old('longitude')); ?>"
                                   class="w-full px-4 py-3 rounded-xl border border-gray-200 text-sm font-bold text-gray-800 focus:ring-2 focus:ring-green-700/20 focus:border-green-700 transition-all" 
                                   placeholder="114.831234">
                        </div>
                    </div>

                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <div class="space-y-2">
                            <label for="tipe" class="text-xs font-bold text-gray-400 uppercase tracking-wider block">Tipe Penempatan</label>
                            <select name="tipe" 
                                    id="tipe"
                                    class="w-full px-4 py-3 rounded-xl border border-gray-200 text-sm font-bold text-gray-700 focus:ring-2 focus:ring-green-700/20 focus:border-green-700 transition-all bg-white">
                                <option value="produksi" <?php echo e(old('tipe') == 'produksi' ? 'selected' : ''); ?>>Rumah Produksi</option>
                                <option value="gudang_distribusi" <?php echo e(old('tipe') == 'gudang_distribusi' ? 'selected' : ''); ?>>Gudang Distribusi</option>
                            </select>
                        </div>

                        <div class="space-y-2">
                            <label for="status" class="text-xs font-bold text-gray-400 uppercase tracking-wider block">Status Operasional</label>
                            <select name="status" 
                                    id="status"
                                    class="w-full px-4 py-3 rounded-xl border border-gray-200 text-sm font-bold text-gray-700 focus:ring-2 focus:ring-green-700/20 focus:border-green-700 transition-all bg-white">
                                <option value="aktif" <?php echo e(old('status') == 'aktif' ? 'selected' : ''); ?>>Aktif (Beroperasi)</option>
                                <option value="nonaktif" <?php echo e(old('status') == 'nonaktif' ? 'selected' : ''); ?>>Non-Aktif (Ditangguhkan)</option>
                            </select>
                        </div>
                    </div>

                    <div class="flex justify-end items-center gap-3 pt-6 border-t border-gray-50">
                        <a href="<?php echo e(route('admin.lokasi.index')); ?>" class="px-5 py-2.5 rounded-xl font-bold text-xs text-gray-500 hover:text-gray-700 transition-colors">
                            Batalkan
                        </a>
                        <button type="submit" class="inline-flex items-center gap-2 bg-green-700 hover:bg-green-800 text-white px-6 py-2.5 rounded-xl font-bold text-xs shadow-md shadow-green-700/10 transition-all active:scale-95">
                            Daftarkan Lokasi
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?><?php /**PATH D:\TempeZhi\resources\views/admin/lokasi/create.blade.php ENDPATH**/ ?>