<?php if (isset($component)) { $__componentOriginalb3b4e25e31274b83c23af9eed7c9e4b9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb3b4e25e31274b83c23af9eed7c9e4b9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.portal-layout','data' => ['title' => 'Request 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' => 'Request 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">Mode preview admin</div>
            <div class="mt-1">Form request disembunyikan agar preview tidak membuat data baru.</div>
            <a href="<?php echo e($previewBackUrl ?? route('portal-preview.index')); ?>" class="mt-3 inline-block rounded-md border border-amber-300 bg-white px-3 py-2 text-amber-900">Kembali</a>
        </section>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

    <section class="rounded-lg bg-white p-5 shadow-sm">
        <div class="text-sm text-slate-500">Request pelanggan</div>
        <h1 class="text-2xl font-semibold"><?php echo e($customer->name); ?></h1>
    </section>

    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (! (($previewMode ?? false) === true)): ?>
        <section class="mt-4 rounded-lg bg-white p-5 shadow-sm">
            <h2 class="font-semibold">Request Pickup</h2>
            <form method="post" action="<?php echo e(route('portal.requests.store')); ?>" class="mt-3 space-y-3">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="type" value="pickup">
                <textarea name="pickup_address" placeholder="Alamat penjemputan" class="w-full rounded-md border px-3 py-3 text-sm"><?php echo e(old('pickup_address', $customer->address)); ?></textarea>
                <div class="grid grid-cols-2 gap-3">
                    <input name="pickup_date" type="date" min="<?php echo e(now()->toDateString()); ?>" value="<?php echo e(old('pickup_date')); ?>" class="rounded-md border px-3 py-3 text-sm">
                    <input name="pickup_time" type="time" value="<?php echo e(old('pickup_time')); ?>" class="rounded-md border px-3 py-3 text-sm">
                </div>
                <textarea name="note" placeholder="Catatan tambahan" class="w-full rounded-md border px-3 py-3 text-sm"><?php echo e(old('note')); ?></textarea>
                <button class="w-full rounded-md bg-slate-900 px-4 py-3 font-medium text-white">Kirim Request Pickup</button>
            </form>
        </section>

        <section class="mt-4 rounded-lg bg-white p-5 shadow-sm">
            <h2 class="font-semibold">Repeat Order</h2>
            <form method="post" action="<?php echo e(route('portal.requests.store')); ?>" class="mt-3 space-y-3">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="type" value="repeat">
                <select name="source_order_id" class="w-full rounded-md border px-3 py-3 text-sm">
                    <option value="">Pilih nota sebelumnya</option>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <option value="<?php echo e($order->id); ?>" <?php if((int) old('source_order_id') === (int) $order->id): echo 'selected'; endif; ?>><?php echo e($order->invoice_no); ?> - <?php echo e($order->created_at->format('d/m/Y')); ?></option>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                </select>
                <textarea name="note" placeholder="Catatan repeat order" class="w-full rounded-md border px-3 py-3 text-sm"><?php echo e(old('note')); ?></textarea>
                <button class="w-full rounded-md border px-4 py-3 font-medium">Kirim Repeat Order</button>
            </form>
        </section>

        <section class="mt-4 rounded-lg bg-white p-5 shadow-sm">
            <h2 class="font-semibold">Request Lainnya</h2>
            <form method="post" action="<?php echo e(route('portal.requests.store')); ?>" class="mt-3 space-y-3">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="type" value="general">
                <textarea name="note" required placeholder="Tulis kebutuhan atau pertanyaan Anda" class="w-full rounded-md border px-3 py-3 text-sm"><?php echo e(old('note')); ?></textarea>
                <button class="w-full rounded-md border px-4 py-3 font-medium">Kirim Request</button>
            </form>
        </section>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

    <section class="mt-4 rounded-lg bg-white p-5 shadow-sm">
        <h2 class="font-semibold">Riwayat Request</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="py-3">
                    <div class="flex justify-between gap-3">
                        <span class="font-medium"><?php echo e(['pickup' => 'Pickup', 'repeat' => 'Repeat Order', 'general' => 'Request Lainnya'][$request->type] ?? $request->type); ?></span>
                        <span class="rounded-full bg-slate-100 px-2 py-1 text-xs"><?php echo e($request->status); ?></span>
                    </div>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($request->note): ?>
                        <div class="mt-2 text-slate-500"><?php echo e($request->note); ?></div>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </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/requests.blade.php ENDPATH**/ ?>