@php
/** @var array $providerAllowed */
/** @var \App\Models\WaProviderConfig|null $providerConfig */
$allowed = $providerAllowed ?? ['waba', 'baileys', 'twilio'];
$cfg = $providerConfig ?? null;
$current = $cfg?->provider;
$appIdSet = (bool) \App\Models\SystemSetting::get('waba_app_id', '');
$appConfigIdSet = (bool) \App\Models\SystemSetting::get('waba_config_id', '');
$sharedNodeUrl = (string) \App\Models\SystemSetting::get('baileys_server_url', env('SERVER_URL', ''));
$sharedTwilioSid = (string) \App\Models\SystemSetting::get('twilio_account_sid', '');
$cards = [
'waba' => [
'title' => 'Official WABA',
'subtitle' => 'Meta Cloud · catalog · in-chat orders',
'iconBg' => 'bg-wa-mint',
'iconFg' => 'text-wa-deep',
'icon' =>
'',
],
'baileys' => [
'title' => 'Unofficial API · QR',
'subtitle' => 'Pair your phone (free, no Meta verification)',
'iconBg' => 'bg-[#D9E5F2]',
'iconFg' => 'text-[#13478A]',
'icon' =>
'',
],
'twilio' => [
'title' => 'Twilio',
'subtitle' => 'Sandbox or paid · Account SID + token',
'iconBg' => 'bg-accent-amber/20',
'iconFg' => 'text-[#7B5A14]',
'icon' =>
'',
],
];
@endphp
{{ __('Your messages — chat, broadcasts, scheduled, auto-reply, store — all flow through whichever provider you connect here. Pick one.') }}
{{ $card['subtitle'] }}{{ __('Connect WhatsApp to this workspace') }}