@php
$resolvedSeo = ($seo ?? null) instanceof \App\Support\Seo\SeoData
? $seo->toArray()
: (is_array($seo ?? null)
? $seo
: app(\App\Support\Seo\SeoFactory::class)->fromViewData(get_defined_vars()));
$jsonLdEntries = collect($resolvedSeo['json_ld'] ?? [])->filter(fn ($schema) => is_array($schema) && $schema !== [])->values();
@endphp
{{ $resolvedSeo['title'] ?? config('seo.default_title', 'Skinbase') }}
@if(!empty($resolvedSeo['description']))
@endif
@if(config('seo.keywords_enabled', true) && !empty($resolvedSeo['keywords']))
@endif
@if(!empty($resolvedSeo['robots']))
@endif
@if(!empty($resolvedSeo['canonical']))
@endif
@if(!empty($resolvedSeo['prev']))
@endif
@if(!empty($resolvedSeo['next']))
@endif
@if(!empty($resolvedSeo['og_title']))
@endif
@if(!empty($resolvedSeo['og_description']))
@endif
@if(!empty($resolvedSeo['og_url']))
@endif
@if(!empty($resolvedSeo['og_image']))
@endif
@if(!empty($resolvedSeo['og_image_alt']))
@endif
@if(!empty($resolvedSeo['twitter_title']))
@endif
@if(!empty($resolvedSeo['twitter_description']))
@endif
@if(!empty($resolvedSeo['twitter_image']))
@endif
@foreach($jsonLdEntries as $schema)
@endforeach