{{-- Homepage FAQ — an infinite, auto-scrolling slider (two rows, opposite directions, pause on hover). Pulls FAQs flagged for the homepage in /admin/pricing-faqs (placement = home | both). Falls back to a default set so the section is never empty on a fresh install. --}} @php try { $faqs = \App\Models\PricingFaq::active()->placement('home')->get(['question', 'answer']); } catch (\Throwable $e) { $faqs = collect(); } if ($faqs->isEmpty()) { $faqs = collect([ ['question' => 'What is the WhatsApp Business API?', 'answer' => 'The official way to send and automate WhatsApp messages at scale — multiple agents, templates, chatbots and analytics on one number.'], ['question' => 'Will my number get banned?', 'answer' => 'Not if you respect opt-in, keep a healthy quality rating and pace your sends. We handle warm-up and pacing for you.'], ['question' => 'Can I broadcast to thousands of contacts?', 'answer' => 'Yes — to opted-in contacts, with batching and gaps that protect your number and your delivery rate.'], ['question' => 'Do I need to write code?', 'answer' => 'No. Build chatbots, flows and campaigns with a drag-and-drop builder — no developers required.'], ['question' => 'How does WhatsApp pricing work?', 'answer' => 'WhatsApp bills per delivered message, by category (marketing, utility, authentication) and country. Service replies and utility messages inside a 24-hour customer window are free. We show the cost of each template up front.'], ['question' => 'Can I connect my existing number?', 'answer' => 'Yes, via the official Cloud API. Customer-initiated chats stay in one shared team inbox.'], ['question' => 'Is there a free trial?', 'answer' => 'Every new workspace starts on a trial so you can test broadcasts, automation and the inbox before you pay.'], ['question' => 'Can I run ads that open a WhatsApp chat?', 'answer' => 'Yes — Click-to-WhatsApp ads drop customers straight into a conversation, and we route them into your inbox + pipeline.'], ]); } $rows = $faqs->values(); $half = (int) ceil($rows->count() / 2); $rowA = $rows->slice(0, $half)->values(); $rowB = $rows->slice($half)->values(); if ($rowB->isEmpty()) { $rowB = $rowA; } @endphp @props(['kicker' => 'FAQ', 'headline' => null, 'subtitle' => null])
{{ fcp('faq-slider.kicker', $kicker) }}

{!! fcp('faq-slider.headline', $headline ?: __('Questions, answered.')) !!}

{{ fcp('faq-slider.subtitle', $subtitle ?: __('Everything teams ask before switching to WhatsApp. Hover to pause.')) }}

@foreach ([['list' => $rowA, 'rev' => false], ['list' => $rowB, 'rev' => true]] as $row)
{{-- rendered twice for a seamless infinite loop --}} @foreach ([1, 2] as $pass) @foreach ($row['list'] as $f)

{{ is_array($f) ? $f['question'] : $f->question }}

{{ is_array($f) ? $f['answer'] : $f->answer }}

@endforeach @endforeach
@endforeach