<?php
    $landingServices = $settings['landing_services'] ?? [
        ['name' => 'Deep Clean', 'price' => 'Mulai Rp35.000', 'description' => 'Treatment detail untuk upper, midsole, outsole, dan tali sepatu.'],
        ['name' => 'Unyellowing', 'price' => 'Mulai Rp45.000', 'description' => 'Bantu angkat noda kuning pada midsole dan bagian putih yang mulai kusam.'],
        ['name' => 'Suede Care', 'price' => 'Mulai Rp50.000', 'description' => 'Perawatan lebih halus untuk suede, nubuck, dan material sensitif.'],
        ['name' => 'Pickup Service', 'price' => 'By area', 'description' => 'Admin bantu jadwalkan penjemputan supaya kamu tinggal siapin sepatunya.'],
    ];
    $landingSteps = $settings['landing_steps'] ?? [
        ['title' => 'Chat atau datang', 'description' => 'Kirim foto sepatu, tanya treatment, atau langsung drop ke outlet.'],
        ['title' => 'Inspeksi awal', 'description' => 'Tim cek kondisi, foto evidence, dan konfirmasi catatan penting.'],
        ['title' => 'Proses cleaning', 'description' => 'Sepatu dicuci sesuai bahan, lalu dikeringkan dan finishing.'],
        ['title' => 'Track & ambil', 'description' => 'Progress bisa dicek online. Saat siap, tinggal ambil atau minta dikirim.'],
    ];
    $landingTrustPoints = $settings['landing_trust_points'] ?? [
        'Evidence foto sebelum proses',
        'Treatment disesuaikan bahan',
        'Progress nota bisa dicek online',
        'Admin aktif via WhatsApp',
    ];
    $landingFaqs = $settings['landing_faqs'] ?? [
        ['question' => 'Bisa pickup?', 'answer' => 'Bisa. Chat admin untuk cek area, jadwal, dan ongkir pickup/delivery.'],
        ['question' => 'Sepatu branded aman?', 'answer' => 'Kami inspeksi dulu dan pilih treatment sesuai bahan. Kondisi khusus akan dikonfirmasi sebelum proses.'],
        ['question' => 'Noda pasti hilang?', 'answer' => 'Noda ringan biasanya aman. Noda lama, luntur, atau kerusakan bahan akan diberi catatan saat inspeksi.'],
        ['question' => 'Bayarnya kapan?', 'answer' => 'Bisa DP atau lunas sesuai kebijakan outlet. Pengambilan dilakukan setelah pembayaran lunas.'],
    ];
?>
<?php if (isset($component)) { $__componentOriginale0f1cdd055772eb1d4a99981c240763e = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0f1cdd055772eb1d4a99981c240763e = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin-layout','data' => ['title' => 'Pengaturan Aplikasi','subtitle' => 'Nama usaha, landing page, logo, footer struk, promo pelanggan, dan retensi evidence.']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin-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' => 'Pengaturan Aplikasi','subtitle' => 'Nama usaha, landing page, logo, footer struk, promo pelanggan, dan retensi evidence.']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

    <form method="post" action="<?php echo e(route('settings.store')); ?>" enctype="multipart/form-data" class="space-y-5">
        <?php echo csrf_field(); ?>

        <section class="grid gap-5 rounded-lg bg-white p-5 shadow-sm lg:grid-cols-[1fr_320px]">
            <div class="grid gap-4 md:grid-cols-2">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = [
                    'business_name' => 'Nama usaha',
                    'business_address' => 'Alamat usaha',
                    'receipt_footer' => 'Footer struk',
                    'evidence_retention_days' => 'Retensi evidence (hari)',
                    'customer_promo_paid_invoice_target' => 'Target promo invoice',
                    'default_whatsapp_number' => 'WhatsApp default',
                ]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <label class="text-sm <?php echo e(in_array($key, ['business_address', 'receipt_footer'], true) ? 'md:col-span-2' : ''); ?>">
                        <?php echo e($label); ?>

                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(in_array($key, ['business_address', 'receipt_footer'], true)): ?>
                            <textarea name="settings[<?php echo e($key); ?>]" rows="3" class="mt-1 w-full rounded-md border px-3 py-2"><?php echo e(old("settings.{$key}", $settings[$key] ?? '')); ?></textarea>
                        <?php else: ?>
                            <input name="settings[<?php echo e($key); ?>]" value="<?php echo e(old("settings.{$key}", $settings[$key] ?? '')); ?>" class="mt-1 w-full rounded-md border px-3 py-2">
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </label>
                <?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; ?>
            </div>

            <aside class="rounded-lg border bg-slate-50 p-4">
                <h2 class="font-semibold">Logo Usaha</h2>
                <div class="mt-4 grid place-items-center rounded-md border border-dashed bg-white p-6">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($logoUrl): ?>
                        <img src="<?php echo e($logoUrl); ?>" alt="Logo usaha" class="max-h-28 max-w-full object-contain">
                    <?php else: ?>
                        <img src="<?php echo e(asset('landing/wash-wear-logo.svg')); ?>" alt="Wash&Wear" class="max-h-28 max-w-full object-contain">
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
                <label class="mt-4 block text-sm">
                    Upload logo
                    <input name="logo" type="file" accept="image/png,image/jpeg,image/webp,image/svg+xml" class="mt-1 w-full rounded-md border bg-white px-3 py-2 text-sm">
                </label>
                <p class="mt-2 text-xs text-slate-500">Format PNG, JPG, WEBP, atau SVG. Maksimal 2 MB.</p>
            </aside>
        </section>

        <section class="rounded-lg bg-white p-5 shadow-sm">
            <div class="mb-4 flex items-center justify-between gap-3">
                <div>
                    <h2 class="font-semibold">Landing Page Publik</h2>
                    <p class="text-sm text-slate-500">Edit teks Gen Z, WhatsApp, layanan, cara order, FAQ, dan gambar landing page.</p>
                </div>
                <a href="<?php echo e(route('landing')); ?>" target="_blank" class="rounded-md border px-3 py-2 text-sm">Preview</a>
            </div>
            <div class="grid gap-4 md:grid-cols-2">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = [
                    'landing_badge' => 'Badge kecil',
                    'landing_title' => 'Judul utama',
                    'landing_subtitle' => 'Subjudul',
                    'landing_whatsapp_number' => 'Nomor WhatsApp landing',
                    'landing_whatsapp_text' => 'Template pesan WhatsApp',
                    'landing_estimate_text' => 'Estimasi pengerjaan',
                    'landing_area_text' => 'Area layanan / pickup',
                    'landing_footer' => 'Footer landing',
                ]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <label class="text-sm <?php echo e(in_array($key, ['landing_title', 'landing_subtitle', 'landing_whatsapp_text', 'landing_estimate_text', 'landing_area_text'], true) ? 'md:col-span-2' : ''); ?>">
                        <?php echo e($label); ?>

                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(in_array($key, ['landing_title', 'landing_subtitle', 'landing_whatsapp_text', 'landing_estimate_text', 'landing_area_text'], true)): ?>
                            <textarea name="settings[<?php echo e($key); ?>]" rows="3" class="mt-1 w-full rounded-md border px-3 py-2"><?php echo e(old("settings.{$key}", $settings[$key] ?? '')); ?></textarea>
                        <?php else: ?>
                            <input name="settings[<?php echo e($key); ?>]" value="<?php echo e(old("settings.{$key}", $settings[$key] ?? '')); ?>" class="mt-1 w-full rounded-md border px-3 py-2">
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </label>
                <?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; ?>
            </div>
        </section>

        <section class="grid gap-5 rounded-lg bg-white p-5 shadow-sm lg:grid-cols-3">
            <div>
                <h2 class="font-semibold">Gambar Hero</h2>
                <img src="<?php echo e($landingHeroUrl); ?>" alt="Hero landing" class="mt-3 h-44 w-full rounded-lg border object-cover">
                <label class="mt-3 block text-sm">
                    Upload gambar hero
                    <input name="landing_hero" type="file" accept="image/png,image/jpeg,image/webp" class="mt-1 w-full rounded-md border bg-white px-3 py-2 text-sm">
                </label>
            </div>
            <div>
                <h2 class="font-semibold">Gambar Layanan</h2>
                <img src="<?php echo e($landingCareKitUrl); ?>" alt="Gambar layanan" class="mt-3 h-44 w-full rounded-lg border object-cover">
                <label class="mt-3 block text-sm">
                    Upload gambar layanan
                    <input name="landing_care_kit" type="file" accept="image/png,image/jpeg,image/webp" class="mt-1 w-full rounded-md border bg-white px-3 py-2 text-sm">
                </label>
            </div>
            <div>
                <h2 class="font-semibold">Gambar Before-After</h2>
                <img src="<?php echo e($landingBeforeAfterUrl); ?>" alt="Before after" class="mt-3 h-44 w-full rounded-lg border object-cover">
                <label class="mt-3 block text-sm">
                    Upload gambar before-after
                    <input name="landing_before_after" type="file" accept="image/png,image/jpeg,image/webp" class="mt-1 w-full rounded-md border bg-white px-3 py-2 text-sm">
                </label>
            </div>
        </section>

        <section class="rounded-lg bg-white p-5 shadow-sm">
            <h2 class="font-semibold">Layanan & Harga</h2>
            <div class="mt-4 grid gap-4 md:grid-cols-2">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $landingServices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <div class="rounded-lg border p-4">
                        <div class="grid gap-3 md:grid-cols-2">
                            <label class="text-sm">Nama layanan
                                <input name="settings[landing_services][<?php echo e($index); ?>][name]" value="<?php echo e(old("settings.landing_services.{$index}.name", $service['name'] ?? '')); ?>" class="mt-1 w-full rounded-md border px-3 py-2">
                            </label>
                            <label class="text-sm">Harga
                                <input name="settings[landing_services][<?php echo e($index); ?>][price]" value="<?php echo e(old("settings.landing_services.{$index}.price", $service['price'] ?? '')); ?>" class="mt-1 w-full rounded-md border px-3 py-2">
                            </label>
                        </div>
                        <label class="mt-3 block text-sm">Deskripsi
                            <textarea name="settings[landing_services][<?php echo e($index); ?>][description]" rows="3" class="mt-1 w-full rounded-md border px-3 py-2"><?php echo e(old("settings.landing_services.{$index}.description", $service['description'] ?? '')); ?></textarea>
                        </label>
                    </div>
                <?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; ?>
            </div>
        </section>

        <section class="rounded-lg bg-white p-5 shadow-sm">
            <h2 class="font-semibold">Cara Order</h2>
            <div class="mt-4 grid gap-4 md:grid-cols-2">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $landingSteps; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $step): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <div class="rounded-lg border p-4">
                        <label class="text-sm">Judul langkah <?php echo e($index + 1); ?>

                            <input name="settings[landing_steps][<?php echo e($index); ?>][title]" value="<?php echo e(old("settings.landing_steps.{$index}.title", $step['title'] ?? '')); ?>" class="mt-1 w-full rounded-md border px-3 py-2">
                        </label>
                        <label class="mt-3 block text-sm">Deskripsi
                            <textarea name="settings[landing_steps][<?php echo e($index); ?>][description]" rows="3" class="mt-1 w-full rounded-md border px-3 py-2"><?php echo e(old("settings.landing_steps.{$index}.description", $step['description'] ?? '')); ?></textarea>
                        </label>
                    </div>
                <?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; ?>
            </div>
        </section>

        <section class="rounded-lg bg-white p-5 shadow-sm">
            <h2 class="font-semibold">Trust Points</h2>
            <div class="mt-4 grid gap-3 md:grid-cols-2">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $landingTrustPoints; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $point): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <label class="text-sm">Poin <?php echo e($index + 1); ?>

                        <input name="settings[landing_trust_points][<?php echo e($index); ?>]" value="<?php echo e(old("settings.landing_trust_points.{$index}", $point)); ?>" class="mt-1 w-full rounded-md border px-3 py-2">
                    </label>
                <?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; ?>
            </div>
        </section>

        <section class="rounded-lg bg-white p-5 shadow-sm">
            <h2 class="font-semibold">FAQ Landing</h2>
            <div class="mt-4 grid gap-4 md:grid-cols-2">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $landingFaqs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $faq): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <div class="rounded-lg border p-4">
                        <label class="text-sm">Pertanyaan
                            <input name="settings[landing_faqs][<?php echo e($index); ?>][question]" value="<?php echo e(old("settings.landing_faqs.{$index}.question", $faq['question'] ?? '')); ?>" class="mt-1 w-full rounded-md border px-3 py-2">
                        </label>
                        <label class="mt-3 block text-sm">Jawaban
                            <textarea name="settings[landing_faqs][<?php echo e($index); ?>][answer]" rows="3" class="mt-1 w-full rounded-md border px-3 py-2"><?php echo e(old("settings.landing_faqs.{$index}.answer", $faq['answer'] ?? '')); ?></textarea>
                        </label>
                    </div>
                <?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; ?>
            </div>
        </section>

        <button class="rounded-md bg-slate-900 px-4 py-2 font-medium text-white">Simpan Pengaturan</button>
    </form>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $attributes = $__attributesOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $component = $__componentOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__componentOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php /**PATH /Users/dedehermawan/Dokumen/project/laundry/resources/views/settings/index.blade.php ENDPATH**/ ?>