@props(['title', 'active' => 'addresses', 'user']) @php $navigation = collect(config('canc_auth.citizen_navigation', [])) ->reject(fn (array $item): bool => isset($item['roles']) && ! in_array($user->role->value, $item['roles'], true)) ->reject(fn (array $item): bool => ($item['membership'] ?? null) === 'delivery' && ! $user->businessMemberships()->where('status', 'active')->exists()) ->reject(fn (array $item): bool => ($item['membership'] ?? null) === 'commune' && ! $user->communeMemberships()->where('status', 'active')->exists()) ->map(fn (array $item, string $key): array => [ 'key' => $key, 'label' => __($item['label_key']), 'icon' => $item['icon'], 'href' => route($item['route']), ]); $mobilePrimaryKeys = ['addresses', 'attestations', 'create', 'notifications', 'profile']; $mobileNavigation = collect($mobilePrimaryKeys)->map(fn (string $key) => $navigation->get($key))->filter(); $primaryNavigation = $navigation->only(['addresses', 'attestations', 'profile']); @endphp
{{ __('address_workspace.private_space') }}
@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())@endif {{ $slot }}