{{-- Expects: - $content: array of section settings (e.g., title, subtitle, bg_color, text_color, items_to_show, view_all_link) - $featured_products_data: Collection of featured product models. --}} @php $sectionTitle = $content['title'] ?? 'Featured Products'; $bgColor = $content['bg_color'] ?? 'bg-white dark:bg-slate-900'; $textColor = $content['text_color'] ?? 'text-gray-800 dark:text-gray-100'; $itemsToShow = (int) ($content['items_to_show'] ?? 4); $viewAllLink = $content['view_all_link'] ?? route('landingpage.products.index'); $products = $featured_products_data ?? collect(); @endphp

{{ $sectionTitle }}

@if(!empty($content['subtitle']))

{{ $content['subtitle'] }}

@else
@endif @if($products->isNotEmpty()) @if($viewAllLink && $products->count() > $itemsToShow) @endif @else

No featured products to display at the moment.

@endif