@include('partials.favicon') @vite(['resources/css/app.css']) @php $content = $qrCode->content(); $type = $qrCode->type; @endphp {{-- ===== PDF ===== --}} @if($type === \App\Models\QrCode::TYPE_DOCUMENT)
View document Download PDF
{{-- ===== LIST OF LINKS ===== --}} @elseif($type === \App\Models\QrCode::TYPE_LINK_LIST)

{{ $qrCode->label }}

@foreach($content['links'] ?? [] as $link) {{ $link['title'] }} @endforeach
{{-- ===== VCARD ===== --}} @elseif($type === \App\Models\QrCode::TYPE_VCARD) @php $avatarUrl = !empty($content['avatar_path']) ? $qrCode->publicPath('avatar') : null; $rawSocial = $content['social'] ?? []; $social = []; foreach ($rawSocial as $platform => $url) { $social[$platform] = \App\Services\Qr\QrPayloadValidator::normalizeSocialUrl($platform, trim((string) $url)); } $fullName = trim(($content['first_name'] ?? '') . ' ' . ($content['last_name'] ?? '')); $initials = strtoupper(substr($content['first_name'] ?? ($content['last_name'] ?? '?'), 0, 1)); $socialIcons = [ 'linkedin' => 'linkedin.svg', 'twitter' => 'twitter.svg', 'instagram' => 'instagram.svg', 'facebook' => 'facebook.svg', 'tiktok' => 'tik-tok.svg', 'youtube' => 'youtube.svg', 'whatsapp' => 'whatsapp.svg', 'snapchat' => 'snapchat.svg', ]; @endphp
{{-- Colored header strip --}}
{{-- Floating card --}}
{{-- Avatar --}}
@if($avatarUrl) {{ $fullName }} @else
{{ $initials }}
@endif
{{-- Name & company --}}

{{ $fullName }}

@if(!empty($content['company']))

{{ $content['company'] }}

@endif
{{-- Contact rows --}}
@if(!empty($content['phone'])) {{ $content['phone'] }} @endif @if(!empty($content['email'])) {{ $content['email'] }} @endif @if(!empty($content['website'])) {{ $content['website'] }} @endif @if(!empty($content['address']))
{{ $content['address'] }}
@endif @if(!empty($content['note']))

{{ $content['note'] }}

@endif
{{-- Social links --}} @if(!empty($social))
@foreach($social as $platform => $url) @if(isset($socialIcons[$platform])) {{ ucfirst($platform) }} @endif @endforeach
@endif {{-- Save contact button --}}
{{-- ===== BUSINESS ===== --}} @elseif($type === \App\Models\QrCode::TYPE_BUSINESS) @php $bizName = $content['name'] ?? $qrCode->label; $bizTagline = $content['tagline'] ?? ''; $bizColor = $content['brand_color'] ?? '#1e3a5f'; $bizHasLogo = !empty($content['logo_path']); $bizHasCover = !empty($content['cover_path']); $bizLogoUrl = $bizHasLogo ? $qrCode->publicPath('business-logo') : null; $bizCoverUrl = $bizHasCover ? $qrCode->publicPath('business-cover') : null; $bizInitials = strtoupper(substr($bizName, 0, 1)); $bizRawSocial = $content['social'] ?? []; $bizSocial = []; foreach ($bizRawSocial as $platform => $url) { $bizSocial[$platform] = \App\Services\Qr\QrPayloadValidator::normalizeSocialUrl($platform, trim((string) $url)); } $socialIcons = [ 'linkedin' => 'linkedin.svg', 'twitter' => 'twitter.svg', 'instagram' => 'instagram.svg', 'facebook' => 'facebook.svg', 'tiktok' => 'tik-tok.svg', 'youtube' => 'youtube.svg', 'whatsapp' => 'whatsapp.svg', ]; @endphp
{{-- Cover strip + logo anchor --}}
{{-- Cover --}}
@if($bizHasCover) {{ $bizName }}
@else
@endif
{{-- Logo: floats at the cover/card seam --}}
@if($bizHasLogo)
{{ $bizName }}
@else
{{ $bizInitials }}
@endif
{{-- Floating card --}}
{{-- Name & tagline centred --}}

{{ $bizName }}

@if($bizTagline)

{{ $bizTagline }}

@endif
{{-- Contact rows --}}
@if(!empty($content['phone'])) {{ $content['phone'] }} @endif @if(!empty($content['email'])) {{ $content['email'] }} @endif @if(!empty($content['website'])) {{ $content['website'] }} @endif @if(!empty($content['address']))
{{ $content['address'] }}
@endif @if(!empty($content['hours']))
{{ $content['hours'] }}
@endif
{{-- Social links --}} @if(!empty($bizSocial))
@foreach($bizSocial as $platform => $url) @if(isset($socialIcons[$platform])) {{ ucfirst($platform) }} @endif @endforeach
@endif {{-- CTA: website button if present --}} @if(!empty($content['website'])) @endif
{{-- ===== CHURCH ===== --}} @elseif($type === \App\Models\QrCode::TYPE_CHURCH) @php $churchName = $content['name'] ?? $qrCode->label; $churchColor = $content['brand_color'] ?? '#1a3a5c'; $churchHasLogo = !empty($content['logo_path']); $churchHasCover = !empty($content['cover_path']); $churchLogoUrl = $churchHasLogo ? $qrCode->publicPath('church-logo') : null; $churchCoverUrl = $churchHasCover ? $qrCode->publicPath('church-cover') : null; $churchInitials = strtoupper(substr($churchName, 0, 2)); $churchAcceptsPay = !empty($content['accepts_payment']); $churchCurrency = $content['currency'] ?? 'GHS'; $churchTypes = $content['collection_types'] ?? ['offering', 'tithe', 'donation', 'harvest']; // Normalise legacy lowercase slugs → display strings $legacyLabels = ['offering'=>'Offering','tithe'=>'Tithe','donation'=>'Donation','harvest'=>'Harvest']; $churchTypeLabels = array_combine( $churchTypes, array_map(fn($t) => $legacyLabels[strtolower(trim($t))] ?? trim($t), $churchTypes) ); $churchOrderRoute = $qrCode->publicPath('order'); $churchCsrf = csrf_token(); @endphp
{{-- Cover strip + logo anchor --}}
@if($churchHasCover) {{ $churchName }}
@else
@endif
{{-- Logo: floats at cover/card seam --}}
@if($churchHasLogo)
{{ $churchName }}
@else
{{ $churchInitials }}
@endif
{{-- Floating card --}}
{{-- Name + denomination + description --}}

{{ $churchName }}

@if(!empty($content['denomination']))

{{ $content['denomination'] }}

@endif @if(!empty($content['description']))

{{ $content['description'] }}

@endif
{{-- Service times badge --}} @if(!empty($content['service_times']))
{{ $content['service_times'] }}
@endif {{-- Compact icon action row --}} @php $hasContact = !empty($content['phone']) || !empty($content['email']) || !empty($content['address']) || !empty($content['website']); @endphp @if($hasContact)
@if(!empty($content['phone'])) @endif @if(!empty($content['email'])) @endif @if(!empty($content['address'])) @endif @if(!empty($content['website'])) @endif
@endif
@if($churchAcceptsPay && !empty($churchTypes)) {{-- Brand color CSS variable so focus rings match --}} {{-- Giving card --}}
{{-- Header --}}

Give Online

Your payment is processed securely

{{-- Collection type icon cards --}} @php // Keyed by lowercase label for case-insensitive lookup $typeIconMap = [ 'offering' => 'M21 11.25v8.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5v-8.25M12 4.875A2.625 2.625 0 1 0 9.375 7.5H12m0-2.625V7.5m0-2.625A2.625 2.625 0 1 1 14.625 7.5H12m0 0V21m-8.625-9.75h18c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125h-18c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z', 'tithe' => 'M2.25 18.75a60.07 60.07 0 0 1 15.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 0 1 3 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 0 0-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 0 1-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 0 0 3 15h-.75M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm3 0h.008v.008H18V10.5Zm-12 0h.008v.008H6V10.5Z', 'donation' => 'M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z', 'harvest' => 'M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z', 'school fees' => 'M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.63 48.63 0 0 1 12 20.904a48.63 48.63 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.57 50.57 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.697 50.697 0 0 1 12 13.489a50.702 50.702 0 0 1 3.741-1.342M6.75 14.25v4.5', 'pta levy' => 'M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z', 'exam fees' => 'M16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10', 'development fund' => 'M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z', 'sadaqah' => 'M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z', 'zakat' => 'M2.25 18.75a60.07 60.07 0 0 1 15.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 0 1 3 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 0 0-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 0 1-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 0 0 3 15h-.75M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm3 0h.008v.008H18V10.5Zm-12 0h.008v.008H6V10.5Z', "waqf" => 'M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z', "jumu'ah" => 'M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z', 'general donation' => 'M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z', 'project fund' => 'M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 0 0 .75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 0 0-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0 1 12 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 0 1-.673-.38m0 0A2.18 2.18 0 0 1 3 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 0 1 3.413-.387m7.5 0V5.25A2.25 2.25 0 0 0 13.5 3h-3a2.25 2.25 0 0 0-2.25 2.25v.894m7.5 0a48.667 48.667 0 0 0-7.5 0M12 12.75h.008v.008H12v-.008Z', 'emergency relief' => 'M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z', 'sponsorship' => 'M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z', 'membership dues' => 'M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z', 'event fund' => 'M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5', ]; $defaultIcon = 'M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09Z'; // Resolve icon for each type by lowercase key $typeIcons = []; foreach ($churchTypeLabels as $key => $label) { $typeIcons[$key] = $typeIconMap[strtolower($label)] ?? $defaultIcon; } @endphp @if(count($churchTypeLabels) > 1)

I'm giving for

Choose a giving category

@foreach($churchTypeLabels as $ct => $ctLabel) @php $iconPath = $typeIcons[$ct] ?? $defaultIcon; @endphp @endforeach
@endif {{-- Quick amounts carousel — shows 2 full chips + peek at 3rd --}}

Quick amount

{{-- Amount input — inline styles to prevent overflow on mobile --}}

Or enter amount

{{ $churchCurrency }}
{{-- Contact fields --}}

Your details

{{-- Error --}}
{{-- Give button --}}

Your giving is safe & secure

@endif @include('partials.paystack-sheet')
{{-- ===== EVENT ===== --}} @elseif($type === \App\Models\QrCode::TYPE_EVENT) @php $evColor = $content['brand_color'] ?? '#4f46e5'; $evHasLogo = !empty($content['logo_path']); $evHasCover = !empty($content['cover_path']); $evLogoUrl = $evHasLogo ? $qrCode->publicPath('event-logo') : null; $evCoverUrl = $evHasCover ? $qrCode->publicPath('event-cover') : null; $evName = $content['name'] ?? $qrCode->label; $evInitials = strtoupper(mb_substr($evName, 0, 2)); $evTiers = $content['tiers'] ?? []; $evCurrency = $content['currency'] ?? 'GHS'; $evFields = $content['badge_fields'] ?? []; $evOpen = (bool) ($content['registration_open'] ?? true); $evMode = in_array($content['mode'] ?? 'ticketing', ['contributions', 'free'], true) ? ($content['mode'] ?? 'ticketing') : 'ticketing'; $evCategories = $content['contribution_categories'] ?? ['Contribution']; $evHeading = $evMode === 'contributions' ? 'Make a contribution' : 'Register'; $evRegRoute = $qrCode->publicPath('register'); $evCsrf = csrf_token(); @endphp
{{-- Hero --}}
@if($evHasCover) {{ $evName }}
@else
@endif
@if($evHasLogo) {{ $evName }} @else
{{ $evInitials }}
@endif

{{ $evName }}

@if(!empty($content['tagline']))

{{ $content['tagline'] }}

@endif
@if(!empty($content['starts_at'])) {{ \App\Support\Qr\QrDateFormatter::forDisplay($content['starts_at']) }} @endif @if(!empty($content['location'])) {{ $content['location'] }} @endif
@if(!empty($content['description']))

{{ $content['description'] }}

@endif @if(! $evOpen)
{{ $evMode === 'contributions' ? 'Contributions are currently closed.' : 'Registration is currently closed.' }}
@else

{{ $evHeading }}

{{-- Ticket tiers --}} @if($evMode === 'ticketing' && count($evTiers) > 0)

Ticket

Choose a ticket type

@foreach($evTiers as $t) @php $tPrice = (float) ($t['price'] ?? 0); @endphp @endforeach
@endif {{-- Contribution categories + amount --}} @if($evMode === 'contributions') @if(count($evCategories) > 1)

I'm giving for

Choose a category

@foreach($evCategories as $cat) @endforeach
@endif {{-- Quick amounts --}}

Quick amount

@foreach([50, 100, 200, 500, 1000] as $qa) @endforeach
{{-- Custom amount --}}

Or enter amount

{{ $evCurrency }}
@endif {{-- Attendee details --}}

Your details

@foreach($evFields as $field) @endforeach

{{ $evMode === 'contributions' ? 'Your contribution is safe & secure.' : 'A badge will be issued on registration.' }}

@endif
@include('partials.paystack-sheet')
{{-- ===== ITINERARY ===== --}} @elseif($type === \App\Models\QrCode::TYPE_ITINERARY) @php $itinColor = $content['brand_color'] ?? '#b45309'; $itinHasCover = !empty($content['cover_path']); $itinCoverUrl = $itinHasCover ? $qrCode->publicPath('itinerary-cover') : null; $itinTitle = $content['title'] ?? $qrCode->label; $itinDays = $content['days'] ?? []; $multiDay = count($itinDays) > 1; @endphp
{{-- Hero --}}
@if($itinHasCover) {{ $itinTitle }}
@else
@endif

{{ $itinTitle }}

@if(!empty($content['subtitle']))

{{ $content['subtitle'] }}

@endif
@if(!empty($content['event_date'])) {{ \App\Support\Qr\QrDateFormatter::forDisplay($content['event_date']) }} @endif @if(!empty($content['location'])) {{ $content['location'] }} @endif
@if(!empty($content['description']))

{{ $content['description'] }}

@endif {{-- Programme --}}
@if($multiDay)
@foreach($itinDays as $di => $day) @endforeach
@endif @foreach($itinDays as $di => $day)

{{ $day['label'] ?: ('Day ' . ($di + 1)) }}

@if(!empty($day['date'])){{ \App\Support\Qr\QrDateFormatter::forDisplay($day['date']) }}@endif
@foreach($day['items'] ?? [] as $ii => $item)
{{-- Timeline rail --}}
@if(! $loop->last)@endif
@if(!empty($item['time']))

{{ $item['time'] }}

@endif

{{ $item['title'] }}

@if(!empty($item['host']) || !empty($item['location']))

{{ $item['host'] ?? '' }}{{ !empty($item['host']) && !empty($item['location']) ? ' · ' : '' }}{{ $item['location'] ?? '' }}

@endif @if(!empty($item['description']))

{{ $item['description'] }}

@endif
@endforeach
@endforeach
{{-- ===== WIFI ===== --}} @elseif($type === \App\Models\QrCode::TYPE_WIFI)

Join WiFi

{{ $qrCode->label }}

Network

{{ $content['ssid'] ?? '' }}

@if(($content['encryption'] ?? 'WPA') !== 'NOPASS' && !empty($content['password']))

Password

{{ $content['password'] }}

@endif
{{ $content['encryption'] ?? 'WPA' }} {{ !empty($content['hidden']) ? ' · Hidden' : '' }}
{{-- ===== IMAGES ===== --}} @elseif($type === \App\Models\QrCode::TYPE_IMAGE)

{{ $qrCode->label }}

@foreach($content['images'] ?? [] as $index => $image) {{ $image['title'] ?? 'Image ' . ($index + 1) }} @endforeach
{{-- ===== APP ===== --}} @elseif($type === \App\Models\QrCode::TYPE_APP) @php $appIconUrl = !empty($content['icon_path']) ? $qrCode->publicPath('app-icon') : null; @endphp
@if($appIconUrl) {{ $content['name'] ?? $qrCode->label }} @else
@endif

{{ $content['name'] ?? $qrCode->label }}

@if(!empty($content['ios_url']))

Download on the

App Store

@endif @if(!empty($content['android_url']))

Get it on

Google Play

@endif @if(!empty($content['web_url']))

Open

Website

@endif
{{-- ===== COUPON ===== --}} @elseif($type === \App\Models\QrCode::TYPE_COUPON)

{{ $content['title'] ?? $qrCode->label }}

Your code

{{ $content['code'] ?? '' }}

@if(!empty($content['description']))

{{ $content['description'] }}

@endif @if(!empty($content['expires_at']))

Expires {{ $content['expires_at'] }}

@endif @if(!empty($content['button_url'])) {{ $content['button_text'] ?? 'Shop now' }} @endif
{{-- ===== MENU & SHOP (shared cart/order UI) ===== --}} @elseif(in_array($type, [\App\Models\QrCode::TYPE_MENU, \App\Models\QrCode::TYPE_SHOP])) @php $isShop = $type === \App\Models\QrCode::TYPE_SHOP; $currency = $content['currency'] ?? 'GHS'; $sections = $content['sections'] ?? []; $title = $content['title'] ?? $qrCode->label; $acceptsPayment = (bool) ($content['accepts_payment'] ?? false); $orderRoute = $qrCode->publicPath('order'); $csrfToken = csrf_token(); $paystackPublicKey = $acceptsPayment ? app(\App\Services\Billing\PaystackService::class)->publicKey() : ''; $brandColor = $content['brand_color'] ?? ($isShop ? '#7c3aed' : '#f97316'); $hasLogo = !empty($content['logo_path']); $hasCover = !empty($content['cover_path']); $logoUrl = $hasLogo ? $qrCode->publicPath('menu-logo') : null; $coverUrl = $hasCover ? $qrCode->publicPath('menu-cover') : null; $shippingType = $content['shipping_type'] ?? 'none'; $shippingFee = (float) ($content['shipping_fee'] ?? 0); $freeShippingAbove = (float) ($content['free_shipping_above'] ?? 0); $itemCount = array_sum(array_map(fn($s) => count($s['items'] ?? []), $sections)); @endphp
{{-- ===== HERO ===== --}}
@if($hasCover) {{ $title }} @endif {{-- gradient overlay always present --}}
@if(!$hasCover)
@endif {{-- Hero content --}}
@if($hasLogo) {{ $title }} @else
{{ strtoupper(substr($title, 0, 1)) }}
@endif

{{ $title }}

{{ $isShop ? 'Shop' : 'Restaurant' }} {{ $itemCount }} {{ $isShop ? ($itemCount === 1 ? 'product' : 'products') : ($itemCount === 1 ? 'item' : 'items') }} @if($acceptsPayment) Order online @endif
{{-- ===== SECTION TABS ===== --}} @if(count($sections) > 1)
@foreach($sections as $si => $section) @endforeach
@endif {{-- ===== ITEMS ===== --}}
@foreach($sections as $si => $section)
@if(count($sections) === 1)

{{ $section['name'] }}

@endif
@foreach($section['items'] ?? [] as $ii => $item) @php $hasImage = !empty($item['image_path']); @endphp
{{-- Item image --}} @if($hasImage) {{ $item['name'] }} @endif {{-- Item details --}}

{{ $item['name'] }}

@if(!empty($item['description']))

{{ $item['description'] }}

@endif
@if(!empty($item['price']))
{{ $currency }} {{ $item['price'] }}
@else @endif @if($acceptsPayment)
@endif
@endforeach
@endforeach
@if($acceptsPayment) {{-- ===== STICKY CART BAR ===== --}}
{{-- ===== PAYMENT MODAL (bottom sheet) ===== --}}
{{-- Drag handle --}}
{{-- Header --}}

Your order

{{-- Cart items --}}
{{-- Totals --}}
Subtotal
Total
{{-- Contact fields --}}

Your details

Your payment is processed securely

@endif @if($acceptsPayment) @include('partials.paystack-sheet') @endif
{{-- end x-data --}} @endif