{{-- Kiri: Sidemenu Kategori --}}

DFOOD

{{-- Tengah: Konten Utama (Daftar Makanan) --}}
@forelse ($foodItems as $item)
@if (isset($item->image_url) && $item->image_url) {{ $item->name }} @else {{ $item->name }} @endif

{{ $item->name }}

Rp {{ number_format($item->price, 0, ',', '.') }}

@empty

Tidak ada menu tersedia untuk kategori ini.

@endforelse
{{-- Kanan: Sidebar Keranjang & Pembayaran --}}

Keranjang Anda

@if (empty($cartItems))

Keranjang kosong.

@else {{-- Di dalam modal keranjang, di bagian 'Pilih Meja Anda' --}}

Pilih Meja Anda

{{-- Checkbox untuk memilih jenis pemesanan meja --}}
{{-- Kondisional untuk menampilkan dropdown meja tersedia atau meja terisi --}} @if (!$isExistingCustomer) {{-- Dropdown untuk Meja Tersedia --}}
@error('selectedTableId') {{ $message }} @enderror
@elseif ($isExistingCustomer)
@error('selectedOccupiedTableId') {{ $message }} @enderror
@endif {{-- Input Nama Pemesan (TERBARU: Hanya muncul jika showCustomerNameInput TRUE) --}} @if ($showCustomerNameInput)
@error('inputCustomerName') {{ $message }} @enderror
@endif {{-- Tombol Lihat Denah Meja --}}
{{-- Daftar Item Keranjang --}}
    @foreach ($cartItems as $item)
  • {{ $item['name'] }}

    Rp {{ number_format($item['price'], 0, ',', '.') }}

    {{ $item['qty'] }}
  • @endforeach
@endif
{{-- Footer Keranjang (Total dan Tombol Pembayaran) --}}
Total: Rp {{ number_format($cartTotal, 0, ',', '.') }}
{{-- Input Email (jika showEmailInput true) --}} @if ($showEmailInput)
@error('customerEmail') {{ $message }} @enderror
@endif {{-- Tombol Pembayaran --}}
{{-- Menggunakan $showEmailInput untuk toggle form, bukan tombol terpisah --}} @if (!$showEmailInput && empty(auth()->user()->email)) @elseif($showEmailInput) @endif
{{-- Overlay untuk sidebar keranjang --}} @if ($showCart)
{{-- Div blur palsu --}}
@endif {{-- Tombol Keranjang Mengambang --}}
{{-- Z-index diatur lebih rendah dari sidebar dan modal --}}
{{-- Modal Denah Meja --}} @if ($showMapModal) @endif