@php $googleFontsUrl = get_google_fonts_url(); $activeDemo = get_theme_demo(); @endphp @if($googleFontsUrl) @endif @php // En preview mode, los colores salen del draft (brand_kit_draft.colors.*). // Solo afecta a usuarios autenticados del tenant que pasan ?preview=brand_kit_draft. $isPreview = function_exists('brand_preview_active') && brand_preview_active(); $brandColors = []; if ($isPreview) { foreach (['primary', 'secondary', 'tertiary', 'quaternary', 'dark', 'light'] as $k) { $v = brand_kit_draft_color($k); if ($v) $brandColors[$k] = $v; } } if (empty($brandColors)) { $brandPrimary = config('site.theme.colors.primary', ''); if ($brandPrimary) { $brandColors = [ 'primary' => $brandPrimary, 'secondary' => config('site.theme.colors.secondary', ''), 'tertiary' => config('site.theme.colors.tertiary', ''), 'quaternary' => config('site.theme.colors.quaternary', ''), 'dark' => config('site.theme.colors.dark', ''), 'light' => config('site.theme.colors.light', ''), ]; $brandColors = array_filter($brandColors); } } @endphp @if(!empty($brandColors)) @endif @if($isPreview) @if(!empty($pFonts)) @endif