@php $user = auth()->user(); $currentLocale = app()->getLocale(); @endphp {{-- The signed-in user's profile menu: a disclosure button (WAI-ARIA disclosure, not role="menu") that opens a panel with the language (kept on the account), the theme (kept on this device by tallstackui_darkTheme() on , whose "mode" the radios bind to) and logging out. Escape and a click outside close it, and so does moving focus out of it to another element (a click on a radio's label text moves focus nowhere, so it must not close the panel). The button's name stays the same; aria-expanded tells whether the panel is open. --}}

{{ $user->name }} {{ __('users.roles.'.$user->role->value) }}

@csrf
{{ __('layout.profile.language') }}
@foreach (\App\Modules\Users\Domain\Enums\Locale::cases() as $locale) @php($isCurrent = $locale->value === $currentLocale) @endforeach
{{ __('layout.profile.theme') }}
@foreach (['light' => 'theme_light', 'dark' => 'theme_dark', 'system' => 'theme_system'] as $mode => $label) @endforeach
@can('machines.use')

@endcan
@csrf