@php $client = auth('client')->user(); $cms = app(\App\Services\CmsSettingsService::class)->get(); $branding = $cms['branding'] ?? []; $useTextLogo = ($branding['use_text_logo'] ?? 'no') === 'yes'; $brandName = $branding['brand_name'] ?? ($branding['site_name'] ?? env('APP_NAME')); $logoUrl = \App\Support\BrandLogo::url('client_header', $cms, 'dark'); $logoWidth = max(0, (int) ($branding['logo_width'] ?? 0)); $logoHeight = max(0, (int) ($branding['logo_height'] ?? 0)); $logoMaxHeight = max(10, (int) ($branding['logo_max_height'] ?? 42)); $logoObjectFit = in_array(($branding['logo_object_fit'] ?? 'contain'), ['contain','cover','fill','none','scale-down'], true) ? ($branding['logo_object_fit'] ?? 'contain') : 'contain'; $initials = collect(preg_split('/\s+/', trim((string) ($client->full_name ?: $client->email)))) ->filter()->take(2)->map(fn($part) => strtoupper(substr($part, 0, 1)))->implode(''); $initials = $initials ?: 'CL'; @endphp