<div class="px-4 pt-3">

    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($editing): ?>
    
    <form wire:submit.prevent="save" class="space-y-4">

        <div class="bg-white rounded-xl border border-slate-100 shadow-sm p-4">
            <h2 class="text-sm font-semibold text-slate-700 mb-4">Edit Data Diri</h2>

            <div class="space-y-3">
                <div>
                    <label class="block text-xs font-medium text-slate-600 mb-1">
                        Nama Lengkap <span class="text-red-500">*</span>
                    </label>
                    <input wire:model="name" type="text" placeholder="Nama lengkap Anda"
                           class="w-full h-11 px-3 bg-slate-50 border border-slate-200 rounded-xl text-sm
                                  focus:outline-none focus:ring-2 focus:ring-orange-400 focus:border-transparent
                                  focus:bg-white transition-all placeholder:text-slate-300" />
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="mt-1 text-xs text-red-500"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>

                <div>
                    <label class="block text-xs font-medium text-slate-600 mb-1">
                        Nomor WhatsApp <span class="text-red-500">*</span>
                    </label>
                    <input wire:model="phone" type="tel" placeholder="08xxxxxxxxxx"
                           class="w-full h-11 px-3 bg-slate-50 border border-slate-200 rounded-xl text-sm
                                  focus:outline-none focus:ring-2 focus:ring-orange-400 focus:border-transparent
                                  focus:bg-white transition-all placeholder:text-slate-300" />
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['phone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="mt-1 text-xs text-red-500"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>

                <div>
                    <label class="block text-xs font-medium text-slate-600 mb-1">
                        Alamat Lengkap <span class="text-red-500">*</span>
                    </label>
                    <textarea wire:model="address" rows="3"
                              placeholder="Nama jalan, nomor rumah, RT/RW, kelurahan..."
                              class="w-full px-3 py-2.5 bg-slate-50 border border-slate-200 rounded-xl text-sm
                                     focus:outline-none focus:ring-2 focus:ring-orange-400 focus:border-transparent
                                     focus:bg-white transition-all placeholder:text-slate-300 resize-none"></textarea>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['address'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="mt-1 text-xs text-red-500"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            </div>
        </div>

        <div class="flex gap-3">
            <button type="button" wire:click="cancelEdit"
                class="flex-1 h-11 flex items-center justify-center border border-slate-200
                       text-slate-600 text-sm font-medium rounded-xl hover:bg-slate-50
                       active:scale-95 transition-all">
                Batal
            </button>
            <button type="submit"
                wire:loading.attr="disabled" wire:target="save"
                class="flex-1 h-11 flex items-center justify-center bg-orange-500 hover:bg-orange-600
                       text-white text-sm font-semibold rounded-xl shadow-sm shadow-orange-200
                       active:scale-95 transition-all disabled:opacity-70">
                <span wire:loading.remove wire:target="save">Simpan</span>
                <span wire:loading wire:target="save">Menyimpan...</span>
            </button>
        </div>

    </form>

    <?php else: ?>
    

        
        <div class="bg-white rounded-xl border border-slate-100 shadow-sm p-4 mb-4">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($guest): ?>
                <div class="flex items-center gap-3 mb-4">
                    <div class="w-14 h-14 rounded-full bg-orange-500 flex items-center justify-center shrink-0
                                shadow-sm shadow-orange-200">
                        <span class="text-white font-black text-xl leading-none">
                            <?php echo e(strtoupper(substr($guest->name, 0, 1))); ?>

                        </span>
                    </div>
                    <div class="min-w-0">
                        <p class="font-bold text-slate-800 truncate"><?php echo e($guest->name); ?></p>
                        <p class="text-xs text-slate-400 mt-0.5"><?php echo e($guest->phone); ?></p>
                    </div>
                </div>

                <div class="space-y-2.5 text-sm border-t border-slate-100 pt-3">
                    <div class="flex gap-3">
                        <svg class="w-4 h-4 text-slate-400 mt-0.5 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                  d="M15 10.5a3 3 0 11-6 0 3 3 0 016 0z"/>
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                  d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z"/>
                        </svg>
                        <p class="text-slate-600 leading-relaxed"><?php echo e($guest->address); ?></p>
                    </div>
                </div>

                <button type="button" wire:click="startEdit"
                    class="mt-4 w-full h-10 flex items-center justify-center gap-2 border border-orange-300
                           text-orange-500 text-sm font-medium rounded-xl hover:bg-orange-50
                           active:scale-95 transition-all">
                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
                        <path stroke-linecap="round" stroke-linejoin="round"
                              d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125"/>
                    </svg>
                    Edit Data Diri
                </button>

            <?php else: ?>
                
                <div class="text-center py-4">
                    <div class="w-14 h-14 rounded-full bg-slate-100 flex items-center justify-center mx-auto mb-3">
                        <svg class="w-7 h-7 text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
                                  d="M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"/>
                        </svg>
                    </div>
                    <p class="text-sm font-medium text-slate-600 mb-1">Belum ada data diri</p>
                    <p class="text-xs text-slate-400 mb-4">Lengkapi data diri agar checkout lebih cepat</p>
                    <button type="button" wire:click="startEdit"
                        class="h-10 px-5 bg-orange-500 hover:bg-orange-600 text-white text-sm
                               font-semibold rounded-xl shadow-sm shadow-orange-200 active:scale-95 transition-all">
                        + Isi Data Diri
                    </button>
                </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>

        
        <div class="bg-white rounded-xl border border-slate-100 shadow-sm overflow-hidden mb-4">

            
            <a href="<?php echo e(route('store.orders')); ?>"
               class="flex items-center gap-3 px-4 py-3.5 hover:bg-slate-50 active:bg-slate-100
                      transition-colors border-b border-slate-50">
                <div class="w-8 h-8 rounded-lg bg-orange-50 flex items-center justify-center shrink-0">
                    <svg class="w-4 h-4 text-orange-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
                        <path stroke-linecap="round" stroke-linejoin="round"
                              d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/>
                    </svg>
                </div>
                <span class="flex-1 text-sm font-medium text-slate-700">Pesanan Saya</span>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($orderCount > 0): ?>
                    <span class="text-xs text-slate-400 mr-1"><?php echo e($orderCount); ?> pesanan</span>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <svg class="w-4 h-4 text-slate-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
                    <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"/>
                </svg>
            </a>

            
            <button type="button" wire:click="startEdit"
               class="w-full flex items-center gap-3 px-4 py-3.5 hover:bg-slate-50 active:bg-slate-100
                      transition-colors border-b border-slate-50 text-left">
                <div class="w-8 h-8 rounded-lg bg-blue-50 flex items-center justify-center shrink-0">
                    <svg class="w-4 h-4 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
                        <path stroke-linecap="round" stroke-linejoin="round"
                              d="M15 10.5a3 3 0 11-6 0 3 3 0 016 0z"/>
                        <path stroke-linecap="round" stroke-linejoin="round"
                              d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z"/>
                    </svg>
                </div>
                <span class="flex-1 text-sm font-medium text-slate-700">Alamat Pengiriman</span>
                <svg class="w-4 h-4 text-slate-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
                    <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"/>
                </svg>
            </button>

            
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($waNumber): ?>
                <?php
                    $waMsg = urlencode('Halo Admin ' . $storeName . ', saya ingin bertanya...');
                ?>
                <a href="https://wa.me/<?php echo e($waNumber); ?>?text=<?php echo e($waMsg); ?>"
                   target="_blank" rel="noopener"
                   class="flex items-center gap-3 px-4 py-3.5 hover:bg-slate-50 active:bg-slate-100
                          transition-colors">
                    <div class="w-8 h-8 rounded-lg bg-green-50 flex items-center justify-center shrink-0">
                        <svg class="w-4 h-4 text-green-500" fill="currentColor" viewBox="0 0 24 24">
                            <path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
                        </svg>
                    </div>
                    <span class="flex-1 text-sm font-medium text-slate-700">Hubungi Admin</span>
                    <svg class="w-4 h-4 text-slate-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
                        <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"/>
                    </svg>
                </a>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>

        
        <div class="bg-white rounded-xl border border-slate-100 shadow-sm overflow-hidden mb-4">

            <?php
            $infoMenus = [
                ['route' => 'store.info.about',   'label' => 'Tentang ' . $storeName,
                 'icon'  => 'M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z'],
                ['route' => 'store.info.contact', 'label' => 'Hubungi Kami',
                 'icon'  => 'M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z'],
                ['route' => 'store.info.faq',     'label' => 'FAQ',
                 'icon'  => 'M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z'],
                ['route' => 'store.info.privacy', 'label' => 'Kebijakan Privasi',
                 'icon'  => 'M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z'],
                ['route' => 'store.info.terms',   'label' => 'Syarat & Ketentuan',
                 'icon'  => 'M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z'],
            ];
            ?>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $infoMenus; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $menu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <a href="<?php echo e(route($menu['route'])); ?>"
                   class="flex items-center gap-3 px-4 py-3.5 hover:bg-slate-50 active:bg-slate-100
                          transition-colors <?php echo e(!$loop->last ? 'border-b border-slate-50' : ''); ?>">
                    <div class="w-8 h-8 rounded-lg bg-slate-100 flex items-center justify-center shrink-0">
                        <svg class="w-4 h-4 text-slate-500" fill="none" stroke="currentColor"
                             viewBox="0 0 24 24" stroke-width="2">
                            <path stroke-linecap="round" stroke-linejoin="round" d="<?php echo e($menu['icon']); ?>"/>
                        </svg>
                    </div>
                    <span class="flex-1 text-sm font-medium text-slate-700"><?php echo e($menu['label']); ?></span>
                    <svg class="w-4 h-4 text-slate-300" fill="none" stroke="currentColor"
                         viewBox="0 0 24 24" stroke-width="2">
                        <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"/>
                    </svg>
                </a>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

        </div>

        
        <div class="mb-4">
            <button type="button" wire:click="clearLocalStorage"
                class="w-full h-10 flex items-center justify-center gap-2 border border-slate-200
                       text-slate-400 text-xs font-medium rounded-xl hover:bg-red-50
                       hover:text-red-400 hover:border-red-200 active:scale-95 transition-all">
                <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
                    <path stroke-linecap="round" stroke-linejoin="round"
                          d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"/>
                </svg>
                Hapus Data Tersimpan di Perangkat
            </button>
        </div>

    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

    
    <div x-data="{ show: false, msg: '' }"
         @notify.window="if($event.detail.type==='success'){ msg=$event.detail.message; show=true; setTimeout(()=>show=false,2500) }"
         x-show="show"
         x-transition:enter="transition ease-out duration-200"
         x-transition:enter-start="opacity-0 translate-y-2"
         x-transition:enter-end="opacity-100 translate-y-0"
         x-transition:leave="transition ease-in duration-150"
         x-transition:leave-end="opacity-0"
         class="fixed bottom-24 inset-x-4 z-50 max-w-sm mx-auto"
         style="display:none">
        <div class="bg-green-600 text-white rounded-xl px-4 py-3 text-sm font-medium shadow-lg
                    flex items-center gap-2">
            <svg class="w-4 h-4 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2.5">
                <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/>
            </svg>
            <span x-text="msg"></span>
        </div>
    </div>

</div>
<?php /**PATH C:\laragon\www\titipin-babe\resources\views/livewire/store/account.blade.php ENDPATH**/ ?>