<?php if (isset($component)) { $__componentOriginalb3b4e25e31274b83c23af9eed7c9e4b9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb3b4e25e31274b83c23af9eed7c9e4b9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.portal-layout','data' => ['title' => 'Portal Pelanggan','previewMode' => $previewMode ?? false,'previewBackUrl' => $previewBackUrl ?? null,'previewHomeUrl' => $previewHomeUrl ?? null,'portalRequestUrl' => $portalRequestUrl ?? null,'portalAccountUrl' => $portalAccountUrl ?? null]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('portal-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(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Portal Pelanggan','preview-mode' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($previewMode ?? false),'preview-back-url' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($previewBackUrl ?? null),'preview-home-url' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($previewHomeUrl ?? null),'portal-request-url' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($portalRequestUrl ?? null),'portal-account-url' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($portalAccountUrl ?? null)]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($previewMode ?? false) === true): ?>
        <section class="mb-4 rounded-lg border border-amber-200 bg-amber-50 p-4 text-sm text-amber-800">
            <div class="font-semibold"><?php echo e($previewTitle ?? 'Mode preview admin'); ?></div>
            <div class="mt-1">Anda melihat portal pelanggan tanpa login sebagai pelanggan. Form interaktif disembunyikan untuk mencegah input tidak sengaja.</div>
            <a href="<?php echo e($previewBackUrl ?? route('customer-requests.index')); ?>" class="mt-3 inline-block rounded-md border border-amber-300 bg-white px-3 py-2 text-amber-900">Kembali ke request</a>
        </section>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

    <section id="home" class="rounded-lg bg-white p-5 shadow-sm">
        <div class="text-sm text-slate-500">Halo</div>
        <div class="flex items-center justify-between gap-3">
            <h1 class="min-w-0 truncate text-2xl font-semibold"><?php echo e($customer->name); ?></h1>
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($previewMode ?? false) !== true): ?>
                <?php $unreadNotifications = $customer->notifications()->whereNull('read_at')->count(); ?>
                <a href="<?php echo e(route('portal.notifications')); ?>" class="relative grid h-11 w-11 shrink-0 place-items-center rounded-full border bg-white">
                    <svg viewBox="0 0 24 24" class="h-5 w-5" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($unreadNotifications > 0): ?>
                        <span class="absolute -right-1 -top-1 min-w-5 rounded-full bg-red-600 px-1.5 py-0.5 text-center text-[10px] font-bold text-white"><?php echo e($unreadNotifications); ?></span>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </a>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
        <div class="mt-4 rounded-md bg-slate-50 p-3 text-sm">
            Promo 5 invoice lunas: <strong><?php echo e($rewardProgress); ?>/5</strong>
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($rewardProgress >= 5): ?>
                <div class="mt-1 text-emerald-700">Reward gratis 1 item jasa tersedia.</div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
    </section>

    <form class="mt-4 rounded-lg bg-white p-4 shadow-sm">
        <label class="block text-sm">Cari nota
            <input name="invoice_no" value="<?php echo e($invoiceQuery); ?>" placeholder="INV-..." class="mt-1 w-full rounded-md border px-3 py-3">
        </label>
        <button class="mt-3 w-full rounded-md border px-4 py-3 text-sm font-medium">Cari</button>
    </form>

    <section id="orders" class="scroll-mt-4 mt-4 rounded-lg bg-white p-5 shadow-sm">
        <h2 class="font-semibold">Riwayat Order</h2>
        <div class="mt-3 divide-y text-sm">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                <?php $latest = $order->progressLogs->sortByDesc('created_at')->first()?->progress_status; ?>
                <a class="block py-3" href="<?php echo e(($previewMode ?? false) === true ? route('portal-preview.order', [$customer, $order]) : route('portal.orders.show', $order)); ?>">
                    <div class="flex justify-between gap-3"><span class="font-medium"><?php echo e($order->invoice_no); ?></span><span><?php echo e($order->status); ?></span></div>
                    <div class="mt-1 flex justify-between gap-3 text-slate-500"><span><?php echo e(str_replace('_', ' ', $latest ?: 'order diterima')); ?></span><span>Rp <?php echo e(number_format($order->balance_due, 0, ',', '.')); ?></span></div>
                </a>
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                <div class="py-3 text-slate-500">Belum ada order.</div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
    </section>

    <section id="requests" class="scroll-mt-4 mt-4 rounded-lg bg-white p-5 shadow-sm">
        <div class="flex items-center justify-between gap-3">
            <div>
                <h2 class="font-semibold">Request</h2>
                <p class="mt-1 text-sm text-slate-500">Pickup, repeat order, atau bantuan lain.</p>
            </div>
            <a href="<?php echo e(($previewMode ?? false) === true ? ($portalRequestUrl ?? route('portal-preview.requests', $customer)) : route('portal.requests')); ?>" class="rounded-md bg-slate-900 px-4 py-2 text-sm font-medium text-white">Buka</a>
        </div>
    </section>

    <section id="account" class="scroll-mt-4 mt-4 rounded-lg bg-white p-5 shadow-sm">
        <div class="flex items-center justify-between gap-3">
            <div>
                <h2 class="font-semibold">Akun</h2>
                <p class="mt-1 text-sm text-slate-500">Profil pelanggan dan pengaturan PIN.</p>
            </div>
            <a href="<?php echo e(($previewMode ?? false) === true ? ($portalAccountUrl ?? route('portal-preview.account', $customer)) : route('portal.account')); ?>" class="rounded-md border px-4 py-2 text-sm font-medium">Buka</a>
        </div>
    </section>

    <section class="mt-4 rounded-lg bg-white p-5 shadow-sm">
        <h2 class="font-semibold">Request Terakhir</h2>
        <div class="mt-3 divide-y text-sm">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $requests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $request): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                <div class="flex justify-between py-3"><span><?php echo e($request->type); ?></span><span><?php echo e($request->status); ?></span></div>
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                <div class="py-3 text-slate-500">Belum ada request.</div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
    </section>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalb3b4e25e31274b83c23af9eed7c9e4b9)): ?>
<?php $attributes = $__attributesOriginalb3b4e25e31274b83c23af9eed7c9e4b9; ?>
<?php unset($__attributesOriginalb3b4e25e31274b83c23af9eed7c9e4b9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalb3b4e25e31274b83c23af9eed7c9e4b9)): ?>
<?php $component = $__componentOriginalb3b4e25e31274b83c23af9eed7c9e4b9; ?>
<?php unset($__componentOriginalb3b4e25e31274b83c23af9eed7c9e4b9); ?>
<?php endif; ?>
<?php /**PATH /Users/dedehermawan/Dokumen/project/laundry/resources/views/portal/dashboard.blade.php ENDPATH**/ ?>