@props(['status']) @php use App\Enums\TwoFactorStatus; [$variant, $textKey, $icon] = match ($status) { TwoFactorStatus::None => ['secondary', 'security.2fa.state.none.badge', 'shield-off'], TwoFactorStatus::OptInActive => ['success', 'security.2fa.state.opt_in_active.badge', 'shield-check'], TwoFactorStatus::EnforcedActive => ['primary', 'security.2fa.state.enforced_active.badge', 'shield-lock'], TwoFactorStatus::EnforcedPending => ['warning', 'security.2fa.state.enforced_pending.badge', 'shield-alert'], }; $colors = [ 'secondary' => ['#6b7280', '#f3f4f6'], 'success' => ['#065f46', '#d1fae5'], 'primary' => ['#1e40af', '#dbeafe'], 'warning' => ['#92400e', '#fef3c7'], ]; [$fg, $bg] = $colors[$variant]; @endphp @switch($icon) @case('shield-off') @break @case('shield-check') @break @case('shield-lock') @break @case('shield-alert') @break @endswitch {{ __('two-factor.'.$textKey) }}