@php $only = $only ?? null; $integrationBadgeClass = $integrationBadgeClass ?? ''; if (! in_array($only, [null, 'mailwizz', 'weeztix'], true)) { $only = null; } $mailwizz = $page->mailwizzIntegrationStatus(); $weeztix = $page->weeztixIntegrationStatus(); $mailwizzClasses = match ($mailwizz) { 'ready' => 'border-emerald-200 bg-emerald-50 text-emerald-900', 'partial' => 'border-amber-200 bg-amber-50 text-amber-950', default => 'border-slate-200 bg-slate-50 text-slate-600', }; $mailwizzLabel = match ($mailwizz) { 'ready' => __('Ready'), 'partial' => __('Incomplete'), default => __('Off'), }; $weeztixClasses = match ($weeztix) { 'ready' => 'border-emerald-200 bg-emerald-50 text-emerald-900', 'connected' => 'border-sky-200 bg-sky-50 text-sky-950', 'credentials' => 'border-amber-200 bg-amber-50 text-amber-950', default => 'border-slate-200 bg-slate-50 text-slate-600', }; $weeztixLabel = match ($weeztix) { 'ready' => __('Ready'), 'connected' => __('Connected'), 'credentials' => __('OAuth only'), default => __('Off'), }; $showMailwizz = $only === null || $only === 'mailwizz'; $showWeeztix = $only === null || $only === 'weeztix'; @endphp