<?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([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex flex-col gap-2">
            <p class="text-xs font-semibold uppercase tracking-[0.3em] text-cyan-300/80">Client Dashboard</p>
            <h2 class="text-2xl font-semibold text-white">Riwayat Pembelanjaan</h2>
            <p class="max-w-2xl text-sm text-slate-300">Halaman khusus untuk melihat semua transaksi pembelian produk client beserta status pembayarannya.</p>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-10">
        <div class="mx-auto flex max-w-7xl flex-col gap-8 px-4 sm:px-6 lg:px-8">
            <?php if(session('success')): ?>
                <div class="rounded-2xl border border-emerald-400/30 bg-emerald-500/10 px-5 py-4 text-sm text-emerald-100">
                    <?php echo e(session('success')); ?>

                </div>
            <?php endif; ?>

            <?php if(session('error')): ?>
                <div class="rounded-2xl border border-rose-400/30 bg-rose-500/10 px-5 py-4 text-sm text-rose-100">
                    <?php echo e(session('error')); ?>

                </div>
            <?php endif; ?>

            <section class="space-y-4">
                <div class="flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between">
                    <div>
                        <p class="text-sm font-medium text-cyan-200">Daftar Transaksi</p>
                        <h3 class="text-2xl font-semibold text-white">Semua pembelian produk client</h3>
                    </div>
                    <p class="max-w-xl text-sm text-slate-400">Status `completed`, `pending`, atau `cancelled` akan tampil otomatis sesuai metode pembayaran yang dipilih.</p>
                </div>

                <div class="space-y-4">
                    <?php $__empty_1 = true; $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <article class="rounded-3xl border border-white/10 bg-slate-950/70 p-5 shadow-2xl shadow-slate-950/20">
                            <div class="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
                                <div>
                                    <p class="text-xs uppercase tracking-[0.2em] text-slate-500">Produk</p>
                                    <h4 class="mt-2 text-lg font-semibold text-white"><?php echo e($order->service->name); ?></h4>
                                    <p class="mt-2 text-sm text-slate-400">Metode: <?php echo e(strtoupper($order->payment_method)); ?> | Order #<?php echo e($order->id); ?></p>
                                    <p class="mt-1 text-sm text-slate-500"><?php echo e($order->created_at->format('d M Y H:i')); ?></p>
                                </div>

                                <div class="flex flex-col items-start gap-3 lg:items-end">
                                    <span class="rounded-full px-4 py-2 text-xs font-semibold
                                        <?php if($order->status === 'completed'): ?> border border-emerald-400/20 bg-emerald-400/10 text-emerald-100
                                        <?php elseif($order->status === 'pending'): ?> border border-amber-400/20 bg-amber-400/10 text-amber-100
                                        <?php else: ?> border border-rose-400/20 bg-rose-400/10 text-rose-100 <?php endif; ?>">
                                        <?php echo e(ucfirst($order->status)); ?>

                                    </span>
                                    <p class="text-xl font-semibold text-white">$<?php echo e($order->formatted_amount); ?></p>
                                    <a href="<?php echo e(route('services.show', $order->service)); ?>" class="inline-flex items-center rounded-full border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-slate-200 transition hover:bg-white/10">
                                        Lihat Detail Produk
                                    </a>
                                </div>
                            </div>

                            <?php if($order->notes): ?>
                                <div class="mt-4 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-slate-300">
                                    <?php echo e($order->notes); ?>

                                </div>
                            <?php endif; ?>
                        </article>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <div class="rounded-3xl border border-dashed border-white/15 bg-white/5 p-10 text-center">
                            <h4 class="text-xl font-semibold text-white">Belum ada riwayat pembelanjaan</h4>
                            <p class="mt-3 text-sm text-slate-400">Setelah client melakukan checkout PayPal atau membuka instruksi QRIS, histori transaksi akan muncul di halaman ini.</p>
                        </div>
                    <?php endif; ?>
                </div>
            </section>
        </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 C:\xampp\htdocs\zijintechnologyinverstment\resources\views/orders/history.blade.php ENDPATH**/ ?>