<?php $__env->startSection('title', 'Customer Profile'); ?>
<?php $__env->startSection('page-title', 'Customer Profile'); ?>

<?php $__env->startSection('breadcrumbs'); ?>
    <li class="breadcrumb-item"><a href="<?php echo e(route('admin.customers.index')); ?>">Customers</a></li>
    <li class="breadcrumb-item active" aria-current="page">Customer Profile</li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<!-- Main Profile Layout Grid -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 items-start">
    
    <!-- Left Column: Profile Card -->
    <div class="space-y-6">
        <div class="bg-white dark:bg-gray-950 border border-gray-200 dark:border-gray-800 rounded-2xl p-6 shadow-soft hover:-translate-y-px transition duration-150 ease-in-out">
            <div class="flex flex-col items-center text-center pb-6 border-b border-slate-100 dark:border-slate-900">
                <div class="relative mb-4">
                    <?php if($customer->profile_image): ?>
                        <img src="<?php echo e(asset('storage/' . $customer->profile_image)); ?>" alt="Avatar" class="w-24 h-24 rounded-full object-cover border-2 border-emerald-500 shadow-sm">
                    <?php else: ?>
                        <div class="w-24 h-24 rounded-full bg-purple-100 dark:bg-purple-900/30 text-purple-600 dark:text-purple-400 flex items-center justify-center text-4xl font-bold border-2 border-purple-500 shadow-sm">
                            <?php echo e(substr($customer->name, 0, 1)); ?>

                        </div>
                    <?php endif; ?>
                    
                    <div class="absolute bottom-0 right-0 border-2 border-white dark:border-gray-950 rounded-full">
                        <?php if (isset($component)) { $__componentOriginal72ffe10338c4ec71bdf1582010227fb9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal72ffe10338c4ec71bdf1582010227fb9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.status-badge','data' => ['status' => $customer->status,'class' => 'px-2 py-0.5 text-[10px]']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.status-badge'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['status' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($customer->status),'class' => 'px-2 py-0.5 text-[10px]']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal72ffe10338c4ec71bdf1582010227fb9)): ?>
<?php $attributes = $__attributesOriginal72ffe10338c4ec71bdf1582010227fb9; ?>
<?php unset($__attributesOriginal72ffe10338c4ec71bdf1582010227fb9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal72ffe10338c4ec71bdf1582010227fb9)): ?>
<?php $component = $__componentOriginal72ffe10338c4ec71bdf1582010227fb9; ?>
<?php unset($__componentOriginal72ffe10338c4ec71bdf1582010227fb9); ?>
<?php endif; ?>
                    </div>
                </div>

                <h2 class="text-lg font-bold text-gray-900 dark:text-white"><?php echo e($customer->name); ?></h2>
                <p class="text-xs text-gray-400 mt-0.5"><?php echo e($customer->customer_group); ?> Customer</p>

                <!-- Actions -->
                <div class="mt-4 flex flex-wrap items-center justify-center gap-2">
                    <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['href' => route('admin.customers.edit', $customer->id),'type' => 'secondary','class' => 'py-1 px-3 text-xs','icon' => 'bi-pencil']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('admin.customers.edit', $customer->id)),'type' => 'secondary','class' => 'py-1 px-3 text-xs','icon' => 'bi-pencil']); ?>
                        Edit Profile
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
                    
                    <form action="<?php echo e(route('admin.customers.toggle-status', $customer->id)); ?>" method="POST">
                        <?php echo csrf_field(); ?>
                        <?php if($customer->status === 'suspended'): ?>
                            <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['buttonType' => 'submit','type' => 'success','class' => 'py-1 px-3 text-xs','icon' => 'bi-check-circle']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['buttonType' => 'submit','type' => 'success','class' => 'py-1 px-3 text-xs','icon' => 'bi-check-circle']); ?>
                                Activate
                             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
                        <?php else: ?>
                            <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['buttonType' => 'submit','type' => 'danger','class' => 'py-1.5 px-3 text-xs','icon' => 'bi-slash-circle']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['buttonType' => 'submit','type' => 'danger','class' => 'py-1.5 px-3 text-xs','icon' => 'bi-slash-circle']); ?>
                                Suspend
                             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
                        <?php endif; ?>
                    </form>
                </div>
            </div>

            <!-- Profile Info Fields -->
            <div class="py-6 space-y-4 text-sm border-b border-slate-100 dark:border-slate-900">
                <div>
                    <span class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider block">Email Address</span>
                    <span class="font-medium text-slate-800 dark:text-slate-200 block"><?php echo e($customer->email); ?></span>
                    <?php if($customer->email_verified_at): ?>
                        <span class="inline-flex items-center gap-1 text-[10px] font-semibold text-green-600 mt-0.5"><i class="bi bi-check-circle-fill"></i> Verified</span>
                    <?php else: ?>
                        <span class="inline-flex items-center gap-1 text-[10px] font-semibold text-amber-500 mt-0.5"><i class="bi bi-exclamation-triangle-fill"></i> Unverified</span>
                    <?php endif; ?>
                </div>

                <div>
                    <span class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider block">Phone Number</span>
                    <span class="font-medium text-slate-800 dark:text-slate-200 block"><?php echo e($customer->phone ?? 'N/A'); ?></span>
                    <?php if($customer->phone): ?>
                        <?php if($customer->phone_verified_at): ?>
                            <span class="inline-flex items-center gap-1 text-[10px] font-semibold text-green-600 mt-0.5"><i class="bi bi-check-circle-fill"></i> Verified</span>
                        <?php else: ?>
                            <span class="inline-flex items-center gap-1 text-[10px] font-semibold text-amber-500 mt-0.5"><i class="bi bi-exclamation-triangle-fill"></i> Unverified</span>
                        <?php endif; ?>
                    <?php endif; ?>
                </div>

                <div class="grid grid-cols-2 gap-4">
                    <div>
                        <span class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider block">Gender</span>
                        <span class="font-medium text-slate-800 dark:text-slate-200 block"><?php echo e(ucfirst($customer->gender ?? 'N/A')); ?></span>
                    </div>
                    <div>
                        <span class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider block">Date of Birth</span>
                        <span class="font-medium text-slate-800 dark:text-slate-200 block"><?php echo e($customer->dob ? $customer->dob->format('M d, Y') : 'N/A'); ?></span>
                    </div>
                </div>

                <div class="grid grid-cols-2 gap-4">
                    <div>
                        <span class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider block">Group</span>
                        <span class="font-medium text-slate-800 dark:text-slate-200 block"><?php echo e($customer->customer_group); ?></span>
                    </div>
                    <div>
                        <span class="text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider block">Last Login</span>
                        <span class="font-medium text-slate-800 dark:text-slate-200 block"><?php echo e($customer->last_login_at ? $customer->last_login_at->format('M d, Y H:i') : 'Never'); ?></span>
                    </div>
                </div>
            </div>

            <!-- Stats -->
            <div class="grid grid-cols-2 gap-4 pt-6 text-center">
                <div class="p-3 bg-slate-50 dark:bg-slate-900 rounded-xl">
                    <span class="text-2xl font-bold text-slate-800 dark:text-slate-200 block"><?php echo e($stats['total_orders']); ?></span>
                    <span class="text-xs text-gray-500">Total Orders</span>
                </div>
                <div class="p-3 bg-slate-50 dark:bg-slate-900 rounded-xl">
                    <span class="text-2xl font-bold text-slate-800 dark:text-slate-200 block">$<?php echo e(number_format($stats['total_spend'], 2)); ?></span>
                    <span class="text-xs text-gray-500">Total Spending</span>
                </div>
            </div>
        </div>
    </div>

    <!-- Right Column: Tabs Panel -->
    <div class="lg:col-span-2 space-y-6">
        <div class="bg-white dark:bg-gray-950 border border-gray-200 dark:border-gray-800 rounded-2xl overflow-hidden shadow-soft">
            <!-- Tabs Headers -->
            <div class="flex border-b border-slate-100 dark:border-slate-900 bg-slate-50/50 dark:bg-slate-900/20 overflow-x-auto whitespace-nowrap">
                <button type="button" onclick="switchTab('addresses')" id="tab-btn-addresses" class="tab-btn px-5 py-3.5 text-xs font-bold uppercase tracking-wider border-b-2 border-emerald-500 text-emerald-600 transition-colors">Saved Addresses</button>
                <button type="button" onclick="switchTab('orders')" id="tab-btn-orders" class="tab-btn px-5 py-3.5 text-xs font-bold uppercase tracking-wider border-b-2 border-transparent text-slate-500 hover:text-slate-800 dark:hover:text-slate-300 transition-colors">Orders</button>
                <button type="button" onclick="switchTab('payments')" id="tab-btn-payments" class="tab-btn px-5 py-3.5 text-xs font-bold uppercase tracking-wider border-b-2 border-transparent text-slate-500 hover:text-slate-800 dark:hover:text-slate-300 transition-colors">Payments</button>
                <button type="button" onclick="switchTab('wishlist')" id="tab-btn-wishlist" class="tab-btn px-5 py-3.5 text-xs font-bold uppercase tracking-wider border-b-2 border-transparent text-slate-500 hover:text-slate-800 dark:hover:text-slate-300 transition-colors">Wishlist</button>
                <button type="button" onclick="switchTab('reviews')" id="tab-btn-reviews" class="tab-btn px-5 py-3.5 text-xs font-bold uppercase tracking-wider border-b-2 border-transparent text-slate-500 hover:text-slate-800 dark:hover:text-slate-300 transition-colors">Reviews</button>
                <button type="button" onclick="switchTab('extras')" id="tab-btn-extras" class="tab-btn px-5 py-3.5 text-xs font-bold uppercase tracking-wider border-b-2 border-transparent text-slate-500 hover:text-slate-800 dark:hover:text-slate-300 transition-colors">Returns & History</button>
            </div>

            <!-- Tab Content Viewports -->
            <div class="p-6">
                
                <!-- 1. Saved Addresses Tab -->
                <div id="tab-content-addresses" class="tab-pane space-y-6">
                    <div class="flex justify-between items-center">
                        <h3 class="text-base font-bold text-slate-800 dark:text-slate-200">Customer Addresses</h3>
                        <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['type' => 'primary','class' => 'py-1.5 px-3 text-xs','onclick' => 'openModal(\'addAddressModal\')','icon' => 'bi-plus']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'primary','class' => 'py-1.5 px-3 text-xs','onclick' => 'openModal(\'addAddressModal\')','icon' => 'bi-plus']); ?>
                            Add Address
                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
                    </div>

                    <?php if($addresses->count() > 0): ?>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                            <?php $__currentLoopData = $addresses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $addr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="relative p-4 border border-slate-200 dark:border-slate-800 rounded-xl bg-slate-50/50 dark:bg-slate-900/20 hover:shadow-sm transition-shadow flex flex-col justify-between">
                                    <div>
                                        <div class="flex items-center gap-2 mb-2 flex-wrap">
                                            <span class="text-xs font-bold text-slate-800 dark:text-slate-200 px-2 py-0.5 bg-slate-200 dark:bg-slate-800 rounded-md"><?php echo e($addr->label); ?></span>
                                            <?php if($addr->is_default_shipping): ?>
                                                <span class="text-[9px] font-semibold bg-emerald-50 text-emerald-700 px-2 py-0.5 rounded-md">Default Shipping</span>
                                            <?php endif; ?>
                                            <?php if($addr->is_default_billing): ?>
                                                <span class="text-[9px] font-semibold bg-blue-50 text-blue-700 px-2 py-0.5 rounded-md">Default Billing</span>
                                            <?php endif; ?>
                                        </div>
                                        <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200"><?php echo e($addr->recipient_name); ?></h4>
                                        <p class="text-xs text-slate-500 font-medium mt-1"><i class="bi bi-telephone mr-1"></i><?php echo e($addr->phone); ?></p>
                                        <p class="text-xs text-slate-600 dark:text-slate-400 mt-2">
                                            <?php echo e($addr->street_address); ?>, <?php echo e($addr->village ? $addr->village . ', ' : ''); ?><?php echo e($addr->commune ? $addr->commune . ', ' : ''); ?><?php echo e($addr->district ? $addr->district . ', ' : ''); ?><?php echo e($addr->city); ?>, <?php echo e($addr->province); ?>, <?php echo e($addr->country); ?>

                                        </p>
                                        <?php if($addr->latitude && $addr->longitude): ?>
                                            <p class="text-[10px] text-slate-400 mt-2 font-mono"><i class="bi bi-geo-alt text-rose-500 mr-1"></i><?php echo e($addr->latitude); ?>, <?php echo e($addr->longitude); ?></p>
                                        <?php endif; ?>
                                    </div>

                                    <div class="mt-4 pt-3 border-t border-slate-100 dark:border-slate-900 flex items-center justify-between gap-2 flex-wrap">
                                        <div class="flex gap-1.5">
                                            <?php if(!$addr->is_default_shipping): ?>
                                                <form action="<?php echo e(route('admin.customers.addresses.set-default', [$customer->id, $addr->id, 'shipping'])); ?>" method="POST">
                                                    <?php echo csrf_field(); ?>
                                                    <button type="submit" class="text-[10px] text-emerald-600 font-bold hover:underline">Set Default Shipping</button>
                                                </form>
                                            <?php endif; ?>
                                            <?php if(!$addr->is_default_billing): ?>
                                                <?php if(!$addr->is_default_shipping): ?> <span class="text-slate-300 text-xs">|</span> <?php endif; ?>
                                                <form action="<?php echo e(route('admin.customers.addresses.set-default', [$customer->id, $addr->id, 'billing'])); ?>" method="POST">
                                                    <?php echo csrf_field(); ?>
                                                    <button type="submit" class="text-[10px] text-blue-600 font-bold hover:underline">Set Default Billing</button>
                                                </form>
                                            <?php endif; ?>
                                        </div>

                                        <div class="flex gap-2">
                                            <button type="button" onclick="openModal('editAddressModal-<?php echo e($addr->id); ?>')" class="text-xs text-slate-500 hover:text-slate-800"><i class="bi bi-pencil"></i></button>
                                            <form action="<?php echo e(route('admin.customers.addresses.destroy', [$customer->id, $addr->id])); ?>" method="POST" onsubmit="return confirm('Delete this address?');">
                                                <?php echo csrf_field(); ?>
                                                <?php echo method_field('DELETE'); ?>
                                                <button type="submit" class="text-xs text-rose-500 hover:text-rose-700"><i class="bi bi-trash"></i></button>
                                            </form>
                                        </div>
                                    </div>
                                </div>

                                <!-- Inline Edit Address Modal -->
                                <?php if (isset($component)) { $__componentOriginal883972b03e56cea0994a1aaccc5761f0 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal883972b03e56cea0994a1aaccc5761f0 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.modal','data' => ['id' => 'editAddressModal-'.e($addr->id).'','title' => 'Edit Customer Address']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => 'editAddressModal-'.e($addr->id).'','title' => 'Edit Customer Address']); ?>
                                    <form action="<?php echo e(route('admin.customers.addresses.update', [$customer->id, $addr->id])); ?>" method="POST">
                                        <?php echo csrf_field(); ?>
                                        <?php echo method_field('PUT'); ?>
                                        <?php echo $__env->make('admin.customers.partials.address-form-fields', ['address' => $addr], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                                        <div class="mt-6 pt-4 border-t border-slate-100 dark:border-slate-800 flex justify-end gap-2">
                                            <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['type' => 'secondary','class' => 'py-1.5 px-3 text-xs','onclick' => 'closeModal(\'editAddressModal-'.e($addr->id).'\')']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'secondary','class' => 'py-1.5 px-3 text-xs','onclick' => 'closeModal(\'editAddressModal-'.e($addr->id).'\')']); ?>Cancel <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
                                            <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['buttonType' => 'submit','class' => 'py-1.5 px-3 text-xs']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['buttonType' => 'submit','class' => 'py-1.5 px-3 text-xs']); ?>Update Address <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
                                        </div>
                                    </form>
                                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal883972b03e56cea0994a1aaccc5761f0)): ?>
<?php $attributes = $__attributesOriginal883972b03e56cea0994a1aaccc5761f0; ?>
<?php unset($__attributesOriginal883972b03e56cea0994a1aaccc5761f0); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal883972b03e56cea0994a1aaccc5761f0)): ?>
<?php $component = $__componentOriginal883972b03e56cea0994a1aaccc5761f0; ?>
<?php unset($__componentOriginal883972b03e56cea0994a1aaccc5761f0); ?>
<?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    <?php else: ?>
                        <div class="text-center py-12 text-slate-400">
                            <i class="bi bi-map text-3xl mb-3"></i>
                            <p class="text-sm">No saved addresses for this customer.</p>
                        </div>
                    <?php endif; ?>
                </div>

                <!-- 2. Orders Tab -->
                <div id="tab-content-orders" class="tab-pane hidden space-y-4">
                    <h3 class="text-base font-bold text-slate-800 dark:text-slate-200 mb-4">Order History</h3>
                    <?php if($orders->count() > 0): ?>
                        <div class="overflow-x-auto border border-slate-100 dark:border-slate-900 rounded-xl">
                            <table class="min-w-full divide-y divide-slate-100 dark:divide-slate-900">
                                <thead class="bg-slate-50 dark:bg-slate-900/50">
                                    <tr>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Order #</th>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Total</th>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Payment Status</th>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Order Status</th>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Date</th>
                                        <th class="px-4 py-3 text-right text-xs font-bold text-slate-500 uppercase">Action</th>
                                    </tr>
                                </thead>
                                <tbody class="divide-y divide-slate-100 dark:divide-slate-900 text-slate-800 dark:text-slate-200 text-sm">
                                    <?php $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td class="px-4 py-3 font-semibold"><?php echo e($order->order_number); ?></td>
                                            <td class="px-4 py-3">$<?php echo e(number_format($order->total, 2)); ?></td>
                                            <td class="px-4 py-3">
                                                <?php if (isset($component)) { $__componentOriginal72ffe10338c4ec71bdf1582010227fb9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal72ffe10338c4ec71bdf1582010227fb9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.status-badge','data' => ['status' => $order->payment_status,'class' => 'text-[10px] px-2 py-0.5']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.status-badge'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['status' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($order->payment_status),'class' => 'text-[10px] px-2 py-0.5']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal72ffe10338c4ec71bdf1582010227fb9)): ?>
<?php $attributes = $__attributesOriginal72ffe10338c4ec71bdf1582010227fb9; ?>
<?php unset($__attributesOriginal72ffe10338c4ec71bdf1582010227fb9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal72ffe10338c4ec71bdf1582010227fb9)): ?>
<?php $component = $__componentOriginal72ffe10338c4ec71bdf1582010227fb9; ?>
<?php unset($__componentOriginal72ffe10338c4ec71bdf1582010227fb9); ?>
<?php endif; ?>
                                            </td>
                                            <td class="px-4 py-3">
                                                <?php if (isset($component)) { $__componentOriginal72ffe10338c4ec71bdf1582010227fb9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal72ffe10338c4ec71bdf1582010227fb9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.status-badge','data' => ['status' => $order->order_status,'class' => 'text-[10px] px-2 py-0.5']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.status-badge'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['status' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($order->order_status),'class' => 'text-[10px] px-2 py-0.5']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal72ffe10338c4ec71bdf1582010227fb9)): ?>
<?php $attributes = $__attributesOriginal72ffe10338c4ec71bdf1582010227fb9; ?>
<?php unset($__attributesOriginal72ffe10338c4ec71bdf1582010227fb9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal72ffe10338c4ec71bdf1582010227fb9)): ?>
<?php $component = $__componentOriginal72ffe10338c4ec71bdf1582010227fb9; ?>
<?php unset($__componentOriginal72ffe10338c4ec71bdf1582010227fb9); ?>
<?php endif; ?>
                                            </td>
                                            <td class="px-4 py-3 text-slate-500"><?php echo e($order->created_at->format('M d, Y H:i')); ?></td>
                                            <td class="px-4 py-3 text-right">
                                                <a href="<?php echo e(route('admin.orders.show', $order->id)); ?>" class="text-xs text-emerald-600 font-bold hover:underline">View</a>
                                            </td>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="mt-4">
                            <?php echo e($orders->links()); ?>

                        </div>
                    <?php else: ?>
                        <div class="text-center py-12 text-slate-400">
                            <i class="bi bi-bag text-3xl mb-3"></i>
                            <p class="text-sm">No orders registered for this customer.</p>
                        </div>
                    <?php endif; ?>
                </div>

                <!-- 3. Payments Tab -->
                <div id="tab-content-payments" class="tab-pane hidden space-y-4">
                    <h3 class="text-base font-bold text-slate-800 dark:text-slate-200 mb-4">Payment History</h3>
                    <?php
                        $paidOrders = $orders->filter(fn($o) => !empty($o->transaction_id) || $o->payment_status === 'paid');
                    ?>

                    <?php if($paidOrders->count() > 0): ?>
                        <div class="overflow-x-auto border border-slate-100 dark:border-slate-900 rounded-xl">
                            <table class="min-w-full divide-y divide-slate-100 dark:divide-slate-900">
                                <thead class="bg-slate-50 dark:bg-slate-900/50">
                                    <tr>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Payment Date</th>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Method</th>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Transaction ID</th>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Amount</th>
                                        <th class="px-4 py-3 text-left text-xs font-bold text-slate-500 uppercase">Status</th>
                                    </tr>
                                </thead>
                                <tbody class="divide-y divide-slate-100 dark:divide-slate-900 text-slate-800 dark:text-slate-200 text-sm">
                                    <?php $__currentLoopData = $paidOrders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $po): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td class="px-4 py-3"><?php echo e($po->updated_at->format('M d, Y H:i')); ?></td>
                                            <td class="px-4 py-3 uppercase font-semibold"><?php echo e($po->payment_method); ?></td>
                                            <td class="px-4 py-3 font-mono text-xs"><?php echo e($po->transaction_id ?? 'N/A'); ?></td>
                                            <td class="px-4 py-3 font-semibold">$<?php echo e(number_format($po->total, 2)); ?></td>
                                            <td class="px-4 py-3">
                                                <?php if (isset($component)) { $__componentOriginal72ffe10338c4ec71bdf1582010227fb9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal72ffe10338c4ec71bdf1582010227fb9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.status-badge','data' => ['status' => 'paid','class' => 'text-[10px] px-2 py-0.5']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.status-badge'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['status' => 'paid','class' => 'text-[10px] px-2 py-0.5']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal72ffe10338c4ec71bdf1582010227fb9)): ?>
<?php $attributes = $__attributesOriginal72ffe10338c4ec71bdf1582010227fb9; ?>
<?php unset($__attributesOriginal72ffe10338c4ec71bdf1582010227fb9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal72ffe10338c4ec71bdf1582010227fb9)): ?>
<?php $component = $__componentOriginal72ffe10338c4ec71bdf1582010227fb9; ?>
<?php unset($__componentOriginal72ffe10338c4ec71bdf1582010227fb9); ?>
<?php endif; ?>
                                            </td>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                    <?php else: ?>
                        <div class="text-center py-12 text-slate-400">
                            <i class="bi bi-credit-card text-3xl mb-3"></i>
                            <p class="text-sm">No transaction records found for this customer.</p>
                        </div>
                    <?php endif; ?>
                </div>

                <!-- 4. Wishlist Tab -->
                <div id="tab-content-wishlist" class="tab-pane hidden space-y-4">
                    <h3 class="text-base font-bold text-slate-800 dark:text-slate-200 mb-4">Customer Wishlist</h3>
                    <?php if($wishlist->count() > 0): ?>
                        <div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
                            <?php $__currentLoopData = $wishlist; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $prod): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="flex items-center gap-3 p-3 border border-slate-100 dark:border-slate-900 rounded-xl hover:bg-slate-50/50 dark:hover:bg-slate-900/20">
                                    <div class="w-12 h-12 bg-slate-100 rounded-lg flex-shrink-0 flex items-center justify-center text-slate-400">
                                        <?php if(!empty($prod->images[0])): ?>
                                            <img src="<?php echo e(asset('storage/' . $prod->images[0])); ?>" alt="Product" class="w-full h-full object-cover rounded-lg">
                                        <?php else: ?>
                                            <i class="bi bi-image text-lg"></i>
                                        <?php endif; ?>
                                    </div>
                                    <div class="flex-1 min-w-0">
                                        <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 truncate hover:text-emerald-600 transition-colors">
                                            <a href="<?php echo e(route('admin.products.edit', $prod->id)); ?>"><?php echo e($prod->name); ?></a>
                                        </h4>
                                        <p class="text-xs text-slate-500 font-bold mt-0.5">$<?php echo e(number_format($prod->price, 2)); ?></p>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    <?php else: ?>
                        <div class="text-center py-12 text-slate-400">
                            <i class="bi bi-heart-fill text-3xl mb-3 text-rose-400"></i>
                            <p class="text-sm">Wishlist is empty.</p>
                        </div>
                    <?php endif; ?>
                </div>

                <!-- 5. Reviews Tab -->
                <div id="tab-content-reviews" class="tab-pane hidden">
                    <h3 class="text-base font-bold text-slate-800 dark:text-slate-200 mb-4">Product Reviews</h3>
                    <div class="text-center py-12 text-slate-400">
                        <i class="bi bi-star text-3xl mb-3 text-amber-400"></i>
                        <p class="text-sm">No reviews submitted by this customer.</p>
                    </div>
                </div>

                <!-- 6. Extras Tab -->
                <div id="tab-content-extras" class="tab-pane hidden space-y-6">
                    <div>
                        <h3 class="text-base font-bold text-slate-800 dark:text-slate-200 mb-4">Return & Refund Requests</h3>
                        <div class="text-center py-6 border border-dashed border-slate-200 dark:border-slate-800 rounded-xl text-slate-400 text-sm">
                            No active return or refund requests.
                        </div>
                    </div>
                    <div>
                        <h3 class="text-base font-bold text-slate-800 dark:text-slate-200 mb-4">Customer Activity Logs</h3>
                        <div class="text-center py-6 border border-dashed border-slate-200 dark:border-slate-800 rounded-xl text-slate-400 text-sm font-mono text-xs">
                            No logs captured.
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>

<!-- Modal: Add Address -->
<?php if (isset($component)) { $__componentOriginal883972b03e56cea0994a1aaccc5761f0 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal883972b03e56cea0994a1aaccc5761f0 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.modal','data' => ['id' => 'addAddressModal','title' => 'Add Customer Address']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => 'addAddressModal','title' => 'Add Customer Address']); ?>
    <form action="<?php echo e(route('admin.customers.addresses.store', $customer->id)); ?>" method="POST">
        <?php echo csrf_field(); ?>
        <?php echo $__env->make('admin.customers.partials.address-form-fields', ['address' => null], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
        <div class="mt-6 pt-4 border-t border-slate-100 dark:border-slate-800 flex justify-end gap-2">
            <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['type' => 'secondary','class' => 'py-1.5 px-3 text-xs','onclick' => 'closeModal(\'addAddressModal\')']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'secondary','class' => 'py-1.5 px-3 text-xs','onclick' => 'closeModal(\'addAddressModal\')']); ?>Cancel <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['buttonType' => 'submit','class' => 'py-1.5 px-3 text-xs']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['buttonType' => 'submit','class' => 'py-1.5 px-3 text-xs']); ?>Add Address <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
        </div>
    </form>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal883972b03e56cea0994a1aaccc5761f0)): ?>
<?php $attributes = $__attributesOriginal883972b03e56cea0994a1aaccc5761f0; ?>
<?php unset($__attributesOriginal883972b03e56cea0994a1aaccc5761f0); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal883972b03e56cea0994a1aaccc5761f0)): ?>
<?php $component = $__componentOriginal883972b03e56cea0994a1aaccc5761f0; ?>
<?php unset($__componentOriginal883972b03e56cea0994a1aaccc5761f0); ?>
<?php endif; ?>

<!-- Tab and Modal Javascript -->
<script>
function switchTab(tabId) {
    // Hide all tab panes
    document.querySelectorAll('.tab-pane').forEach(function(el) {
        el.classList.add('hidden');
    });
    // Remove border highlight from all button tabs
    document.querySelectorAll('.tab-btn').forEach(function(btn) {
        btn.classList.remove('border-emerald-500', 'text-emerald-600');
        btn.classList.add('border-transparent', 'text-slate-500');
    });

    // Show current tab pane
    document.getElementById('tab-content-' + tabId).classList.remove('hidden');
    // Highlight current button
    var activeBtn = document.getElementById('tab-btn-' + tabId);
    activeBtn.classList.remove('border-transparent', 'text-slate-500');
    activeBtn.classList.add('border-emerald-500', 'text-emerald-600');
}

function openModal(id) {
    window.openModal(id);
}

function closeModal(id) {
    window.closeModal(id);
}
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/mac/Documents/e-com/resources/views/admin/customers/show.blade.php ENDPATH**/ ?>