*/ public function bootstrap(?User $user, bool $public): array { return [ 'variant' => $public ? 'public' : 'full', 'title' => $public ? 'Al Rahma API — Public Docs' : 'Al Rahma Sunday School — API Docs', 'openapi_url' => $this->urls->docsSwaggerMergedJsonUrl(false), 'try_it_out_enabled' => ! $public, 'persist_authorization' => ! $public, 'show_authorize_button' => ! $public, 'welcome_name' => $public ? null : $this->welcomeName($user), ]; } private function welcomeName(?User $user): ?string { if (! $user) { return null; } $full = trim(($user->firstname ?? '').' '.($user->lastname ?? '')); return $full !== '' ? $full : ($user->email ?: 'Admin'); } }