@php
$u = auth()->user();
$initials = strtoupper(mb_substr($u->name, 0, 2));
$twoFactorEnabled = $u->hasTwoFactorEnabled();
$tabs = [
['key' => 'profile', 'label' => __('settings.tab_profile'), 'icon' => 'settings'],
['key' => 'security', 'label' => __('settings.tab_security'), 'icon' => 'shield'],
['key' => 'login-protection', 'label' => __('settings.tab_login_protection'), 'icon' => 'shield'],
['key' => 'users', 'label' => __('settings.tab_users'), 'icon' => 'user-plus'],
['key' => 'sessions', 'label' => __('settings.tab_sessions'), 'icon' => 'logout'],
['key' => 'email', 'label' => __('settings.tab_email'), 'icon' => 'mail'],
];
@endphp
@if ($openRecoveryModal)
@endif
{{-- Identity header --}}
{{ $initials }}
{{ __('settings.account') }}
{{ $u->name }}
{{ $u->email }}
{{ __('settings.role_admin') }}
$twoFactorEnabled,
'border-line text-ink-3' => ! $twoFactorEnabled,
])>
{{ $twoFactorEnabled ? __('settings.two_factor_on') : __('settings.two_factor_off') }}
{{-- Section nav --}}
{{-- Content --}}
@if ($tab === 'profile')
@elseif ($tab === 'security')
@elseif ($tab === 'login-protection')
@elseif ($tab === 'users')
@elseif ($tab === 'sessions')
@elseif ($tab === 'email')
{{-- Unknown ?tab= falls back to profile instead of rendering nothing. --}}
@else
@endif